diff --git a/src/apis/paths/conversation.ts b/src/apis/paths/conversation.ts index 315c510f6aab6f2af8ece95c49b7b632f840194c..45561aa6c261852f2e410a0fd04b9e0d857e2b08 100644 --- a/src/apis/paths/conversation.ts +++ b/src/apis/paths/conversation.ts @@ -11,7 +11,10 @@ import { get, put, post, del } from 'src/apis/server'; import type { FcResponse } from 'src/apis/server'; import { ConversationRecordList, ConversationList } from './type'; +import i18n from 'src/i18n'; + const BASE_URL = '/api/conversation'; +const { t } = i18n.global; /** * 停止生成 @@ -42,11 +45,13 @@ export const createSession = ({ appId, debug = false, llm_id = '', + title = t('history.new_conversation'), kb_ids = [], }: { appId: string; debug?: boolean; llm_id?: string; + title?: string; kb_ids?: string[]; }): Promise< [ @@ -59,7 +64,7 @@ export const createSession = ({ ), ] > => { - return post(BASE_URL, { appId, debug }, { llm_id, kb_ids }); + return post(BASE_URL, { appId, debug }, { llm_id, kb_ids, title }); }; /** diff --git a/src/apis/paths/type.ts b/src/apis/paths/type.ts index 56975dde1ed59bf823ecb5728927017fd27fa1a3..fa283f66ddb7d20f079a3c37091ee825b215a330 100644 --- a/src/apis/paths/type.ts +++ b/src/apis/paths/type.ts @@ -63,7 +63,7 @@ export interface ConversationRecord { content: Content; metadata: Metadata; comment: string; - created_at: string; + createdAt: string; document?: any[]; } diff --git a/src/components/dialoguePanel/DialoguePanel.vue b/src/components/dialoguePanel/DialoguePanel.vue index 5eb70d5d5d02c6435bf8d264acc8453ee62bebcf..8d476517d10b2a0293c7abb32f81ba6d56bc8891 100644 --- a/src/components/dialoguePanel/DialoguePanel.vue +++ b/src/components/dialoguePanel/DialoguePanel.vue @@ -667,7 +667,7 @@ const handleFileClick = () => {