feat: 模型介绍和温度调整。完善聊天页提示

This commit is contained in:
Archer
2023-03-18 12:32:55 +08:00
parent 1c364eca35
commit 00b90f071d
32 changed files with 628 additions and 327 deletions

View File

@@ -1,16 +1,16 @@
import { GET, POST, DELETE, PUT } from './request';
import type { ModelType } from '@/types/model';
import type { ModelSchema } from '@/types/mongoSchema';
import { ModelUpdateParams } from '@/types/model';
import { TrainingItemType } from '../types/training';
export const getMyModels = () => GET<ModelType[]>('/model/list');
export const getMyModels = () => GET<ModelSchema[]>('/model/list');
export const postCreateModel = (data: { name: string; serviceModelName: string }) =>
POST<ModelType>('/model/create', data);
POST<ModelSchema>('/model/create', data);
export const delModelById = (id: string) => DELETE(`/model/del?modelId=${id}`);
export const getModelById = (id: string) => GET<ModelType>(`/model/detail?modelId=${id}`);
export const getModelById = (id: string) => GET<ModelSchema>(`/model/detail?modelId=${id}`);
export const putModelById = (id: string, data: ModelUpdateParams) =>
PUT(`/model/update?modelId=${id}`, data);

View File

@@ -6,6 +6,7 @@ export type InitChatResponse = {
modelId: string;
name: string;
avatar: string;
intro: string;
secret: ModelSchema.secret;
chatModel: ModelSchema.service.ChatModel; // 模型名
history: ChatItemType[];