wujingjing
2024-07-24 4eb6092c32df67d752101ab8ae23c9b2236db0dc
src/components/chat/model/types.ts
@@ -11,6 +11,7 @@
   Text = 'text',
   Summary = 'summary',
   Url = 'url',
   Map = 'map',
}
export const answerTypeMapCom = {
@@ -23,7 +24,6 @@
export const enum RoleEnum {
   user = 'user',
   assistant = 'assistant',
   system = 'system',
}
export const AnswerState = {
   Null: null,
@@ -32,11 +32,20 @@
};
export type AnswerStateType = typeof AnswerState;
export type ContextHistory = {
   /** @description 数字字符串 */
   ratio: string;
   history_id: string;
   question: string;
};
export type ChatContent = {
   type: AnswerType;
   values: any;
   error?:string;
   askMoreList?: ContextHistory[];
   errCode?: string;
   errMsg?: string;
   origin?: any;
};
export interface ChatMessage {
@@ -49,5 +58,4 @@
export const roleImageMap = {
   [RoleEnum.user]: userPic,
   [RoleEnum.assistant]: assistantPic,
   [RoleEnum.system]: userPic,
};