Skip to content

Commit f36bafc

Browse files
chore: adding llm-server fix (#162)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
1 parent c0cefe4 commit f36bafc

File tree

6 files changed

+7
-12
lines changed

6 files changed

+7
-12
lines changed

backend/src/config/env.validation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export class EnvironmentVariables {
2323
DB_DATABASE?: string;
2424

2525
@IsNumber()
26-
PORT: number;
26+
PORT: number = 8000;
2727

2828
@IsString()
2929
@IsIn(['DEV', 'PROD', 'TEST'])

llm-server/src/downloader/model-downloader.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Logger } from '@nestjs/common';
22
import { PipelineType, pipeline, env } from '@huggingface/transformers';
33
import { isRemoteModel } from './const';
44
import { UniversalStatusManager } from './universal-status';
5-
import { getModelsDir } from 'codefox-common/dist/esm';
5+
import { getModelsDir } from 'codefox-common';
66

77
env.allowLocalModels = true;
88
env.localModelPath = getModelsDir();

llm-server/src/downloader/universal-status.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { getModelStatusPath } from 'codefox-common/dist/esm';
1+
import { getModelStatusPath } from 'codefox-common';
22
import * as fs from 'fs';
33
import * as path from 'path';
44

llm-server/src/downloader/universal-utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { UniversalDownloader } from './model-downloader';
22
import { Logger } from '@nestjs/common';
33
import { UniversalStatusManager } from './universal-status';
4-
import { ConfigLoader, getModelsDir } from 'codefox-common/dist/esm';
4+
import { ConfigLoader, getModelsDir } from 'codefox-common';
55

66
const logger = new Logger('model-utils');
77

llm-server/src/llm-provider.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
import { Response } from 'express';
22
import { Logger } from '@nestjs/common';
3-
import {
4-
ConfigLoader,
5-
ModelConfig,
6-
ModelApiStreamChunk,
7-
} from 'codefox-common/dist/esm';
3+
import { ConfigLoader, ModelConfig, ModelApiStreamChunk } from 'codefox-common';
84
import {
95
ModelProviderType,
106
ModelProviderOptions,

llm-server/tsconfig.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"skipLibCheck": true,
88
"forceConsistentCasingInFileNames": true,
99
"outDir": "./dist",
10+
"rootDir": "./src",
1011
"sourceMap": true,
1112
"inlineSourceMap": false,
1213
"inlineSources": true,
@@ -16,9 +17,7 @@
1617
"resolveJsonModule": true,
1718
"baseUrl": ".",
1819
"paths": {
19-
"*": ["node_modules/*"],
20-
"codefox-common": ["../codefox-common/src"],
21-
"codefox-common/*": ["../codefox-common/src/*"]
20+
"*": ["node_modules/*"]
2221
},
2322
"types": ["node", "express"]
2423
},

0 commit comments

Comments
 (0)