training queue
This commit is contained in:
2
src/types/index.d.ts
vendored
2
src/types/index.d.ts
vendored
@@ -5,8 +5,6 @@ import type { Pool } from 'pg';
|
||||
declare global {
|
||||
var mongodb: Mongoose | string | null;
|
||||
var pgClient: Pool | null;
|
||||
var generatingQA: boolean;
|
||||
var generatingVector: boolean;
|
||||
var httpsAgent: Agent;
|
||||
var particlesJS: any;
|
||||
var grecaptcha: any;
|
||||
|
||||
2
src/types/model.d.ts
vendored
2
src/types/model.d.ts
vendored
@@ -1,6 +1,6 @@
|
||||
import { ModelStatusEnum } from '@/constants/model';
|
||||
import type { ModelSchema, kbSchema } from './mongoSchema';
|
||||
import { ChatModelType, ModelVectorSearchModeEnum } from '@/constants/model';
|
||||
import { ChatModelType, appVectorSearchModeEnum } from '@/constants/model';
|
||||
|
||||
export type ModelListItemType = {
|
||||
_id: string;
|
||||
|
||||
12
src/types/mongoSchema.d.ts
vendored
12
src/types/mongoSchema.d.ts
vendored
@@ -2,12 +2,13 @@ import type { ChatItemType } from './chat';
|
||||
import {
|
||||
ModelStatusEnum,
|
||||
ModelNameEnum,
|
||||
ModelVectorSearchModeEnum,
|
||||
appVectorSearchModeEnum,
|
||||
ChatModelType,
|
||||
EmbeddingModelType
|
||||
} from '@/constants/model';
|
||||
import type { DataType } from './data';
|
||||
import { BillTypeEnum } from '@/constants/user';
|
||||
import { TrainingTypeEnum } from '@/constants/plugin';
|
||||
|
||||
export interface UserModelSchema {
|
||||
_id: string;
|
||||
@@ -44,7 +45,7 @@ export interface ModelSchema {
|
||||
updateTime: number;
|
||||
chat: {
|
||||
relatedKbs: string[];
|
||||
searchMode: `${ModelVectorSearchModeEnum}`;
|
||||
searchMode: `${appVectorSearchModeEnum}`;
|
||||
systemPrompt: string;
|
||||
temperature: number;
|
||||
chatModel: ChatModelType; // 聊天时用的模型,训练后就是训练的模型
|
||||
@@ -68,13 +69,14 @@ export interface CollectionSchema {
|
||||
|
||||
export type ModelDataType = 0 | 1;
|
||||
|
||||
export interface SplitDataSchema {
|
||||
export interface TrainingDataSchema {
|
||||
_id: string;
|
||||
userId: string;
|
||||
kbId: string;
|
||||
lockTime: Date;
|
||||
vectorList: { q: string; a: string }[];
|
||||
prompt: string;
|
||||
errorText: string;
|
||||
textList: string[];
|
||||
qaList: string[];
|
||||
}
|
||||
|
||||
export interface ChatSchema {
|
||||
|
||||
15
src/types/plugin.d.ts
vendored
15
src/types/plugin.d.ts
vendored
@@ -1,5 +1,4 @@
|
||||
import type { kbSchema } from './mongoSchema';
|
||||
import { PluginTypeEnum } from '@/constants/plugin';
|
||||
|
||||
/* kb type */
|
||||
export interface KbItemType extends kbSchema {
|
||||
@@ -16,20 +15,6 @@ export interface KbDataItemType {
|
||||
userId: string;
|
||||
}
|
||||
|
||||
/* plugin */
|
||||
export interface PluginConfig {
|
||||
name: string;
|
||||
desc: string;
|
||||
url: string;
|
||||
category: `${PluginTypeEnum}`;
|
||||
uniPrice: 22; // 1k token
|
||||
params: [
|
||||
{
|
||||
type: '';
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
export type TextPluginRequestParams = {
|
||||
input: string;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user