diff --git a/cortex-js/src/infrastructure/database/database.module.ts b/cortex-js/src/infrastructure/database/database.module.ts index 9a42f47e2..6ff802705 100644 --- a/cortex-js/src/infrastructure/database/database.module.ts +++ b/cortex-js/src/infrastructure/database/database.module.ts @@ -1,7 +1,6 @@ import { Module } from '@nestjs/common'; import { threadProviders } from './providers/thread.providers'; import { sqliteDatabaseProviders } from './sqlite-database.providers'; -import { modelProviders } from './providers/model.providers'; import { assistantProviders } from './providers/assistant.providers'; import { messageProviders } from './providers/message.providers'; import { FileManagerModule } from '@/file-manager/file-manager.module'; @@ -11,15 +10,9 @@ import { FileManagerModule } from '@/file-manager/file-manager.module'; providers: [ ...sqliteDatabaseProviders, ...threadProviders, - ...modelProviders, - ...assistantProviders, - ...messageProviders, - ], - exports: [ - ...threadProviders, - ...modelProviders, ...assistantProviders, ...messageProviders, ], + exports: [...threadProviders, ...assistantProviders, ...messageProviders], }) export class DatabaseModule {} diff --git a/cortex-js/src/infrastructure/database/providers/model.providers.ts b/cortex-js/src/infrastructure/database/providers/model.providers.ts deleted file mode 100644 index 30dcf2645..000000000 --- a/cortex-js/src/infrastructure/database/providers/model.providers.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { ModelEntity } from '@/infrastructure/entities/model.entity'; -import { DataSource } from 'typeorm'; - -export const modelProviders = [ - { - provide: 'MODEL_REPOSITORY', - useFactory: (dataSource: DataSource) => - dataSource.getRepository(ModelEntity), - inject: ['DATA_SOURCE'], - }, -]; diff --git a/cortex-js/src/infrastructure/entities/model.entity.ts b/cortex-js/src/infrastructure/entities/model.entity.ts deleted file mode 100644 index 052eb7d22..000000000 --- a/cortex-js/src/infrastructure/entities/model.entity.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { Model, ModelArtifact } from '@/domain/models/model.interface'; -import { Column, Entity, PrimaryColumn } from 'typeorm'; - -@Entity('models') -export class ModelEntity implements Model { - // Cortex Meta - @PrimaryColumn() - model: string; - - @Column() - name: string; - - @Column() - version: string; - - @Column({ type: 'simple-json' }) - files: string[] | ModelArtifact; - - // Model Input / Output Syntax - @Column() - prompt_template: string; - - @Column({ type: 'simple-json' }) - stop: string[]; - - @Column() - max_tokens: number; - - // Results Preferences - @Column() - top_p: number; - - @Column() - temperature: number; - - @Column() - frequency_penalty: number; - - @Column() - presence_penalty: number; - - @Column() - stream: boolean; - - // Engine Settings - @Column() - ctx_len: number; - - @Column() - ngl: number; - - @Column() - n_parallel: number; - - @Column() - cpu_threads: number; - - @Column() - engine: string; -}