feat: model related kb

This commit is contained in:
archer
2023-05-17 22:09:38 +08:00
parent a79429fdcd
commit 5bf95bd846
16 changed files with 178 additions and 117 deletions
+2 -2
View File
@@ -1,5 +1,6 @@
import { ModelStatusEnum } from '@/constants/model';
import type { ModelSchema } from './mongoSchema';
import type { ModelSchema, kbSchema } from './mongoSchema';
import { ChatModelType, ModelVectorSearchModeEnum } from '@/constants/model';
export type ModelListItemType = {
_id: string;
@@ -13,7 +14,6 @@ export interface ModelUpdateParams {
avatar: string;
chat: ModelSchema['chat'];
share: ModelSchema['share'];
security: ModelSchema['security'];
}
export interface ShareModelItem {
+1 -8
View File
@@ -38,7 +38,7 @@ export interface ModelSchema {
status: `${ModelStatusEnum}`;
updateTime: number;
chat: {
useKb: boolean;
relatedKbs: string[];
searchMode: `${ModelVectorSearchModeEnum}`;
systemPrompt: string;
temperature: number;
@@ -50,13 +50,6 @@ export interface ModelSchema {
intro: string;
collection: number;
};
security: {
domain: string[];
contextMaxLen: number;
contentMaxLen: number;
expiredTime: number;
maxLoadAmount: number;
};
}
export interface ModelPopulate extends ModelSchema {