Files
DB-GPT/web/types/chat.ts
lcxadml d55c51a6b7 Feat: optimize dashboard UI and fix sql highlight (#1329)
Co-authored-by: hzh97 <2976151305@qq.com>
Co-authored-by: aries_ckt <916701291@qq.com>
2024-04-10 22:50:47 +08:00

117 lines
2.1 KiB
TypeScript

type ChartValue = {
name: string;
type: string;
value: number;
};
/**
* dashboard chart type
*/
export type ChartData = {
chart_desc: string;
chart_name: string;
chart_sql: string;
chart_type: string;
chart_uid: string;
column_name: Array<string>;
values: Array<ChartValue>;
type?: string;
};
export type SceneResponse = {
chat_scene: string;
param_title: string;
scene_describe: string;
scene_name: string;
show_disable: boolean;
};
export type NewDialogueParam = {
chat_mode: string;
model?: string;
};
export type ChatHistoryResponse = IChatDialogueMessageSchema[];
export type IChatDialogueSchema = {
conv_uid: string;
user_input: string;
user_name: string;
chat_mode:
| 'chat_with_db_execute'
| 'chat_excel'
| 'chat_with_db_qa'
| 'chat_knowledge'
| 'chat_dashboard'
| 'chat_execution'
| 'chat_agent'
| 'chat_flow'
| (string & {});
select_param: string;
};
export type DialogueListResponse = IChatDialogueSchema[];
export type IChatDialogueMessageSchema = {
role: 'human' | 'view' | 'system' | 'ai';
context: string;
order: number;
time_stamp: number | string | null;
model_name: string;
retry?: boolean;
};
export type ModelType =
| 'proxyllm'
| 'flan-t5-base'
| 'vicuna-13b'
| 'vicuna-7b'
| 'vicuna-13b-v1.5'
| 'vicuna-7b-v1.5'
| 'codegen2-1b'
| 'codet5p-2b'
| 'chatglm-6b-int4'
| 'chatglm-6b'
| 'chatglm2-6b'
| 'chatglm2-6b-int4'
| 'guanaco-33b-merged'
| 'falcon-40b'
| 'gorilla-7b'
| 'gptj-6b'
| 'proxyllm'
| 'chatgpt_proxyllm'
| 'bard_proxyllm'
| 'claude_proxyllm'
| 'wenxin_proxyllm'
| 'tongyi_proxyllm'
| 'zhipu_proxyllm'
| 'llama-2-7b'
| 'llama-2-13b'
| 'llama-2-70b'
| 'baichuan-7b'
| 'baichuan-13b'
| 'baichuan2-7b'
| 'baichuan2-13b'
| 'wizardlm-13b'
| 'llama-cpp'
| (string & {});
export type LLMOption = { label: string; icon: string };
export type FeedBack = {
information?: string;
just_fun?: string;
others?: string;
work_study?: string;
};
export type Reference = {
name: string;
chunks: Array<number>;
};
export type IDB = {
param: string;
type: string;
};