From bd5262e21debb17eb124e69a5f9ab67fb4f4cd11 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Wed, 15 May 2024 13:00:31 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=96=B0=E5=A2=9E=E3=80=91AI=EF=BC=9A?= =?UTF-8?q?=E8=81=8A=E5=A4=A9=E6=9B=B4=E6=96=B0=E7=9A=84=E7=AA=97=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/ai/chat/conversation/index.ts | 10 +- src/api/ai/model/chatRole/index.ts | 3 +- .../components/ChatConversationUpdateForm.vue | 124 ++++++++++++++++++ src/views/ai/chat/index.vue | 36 +++-- src/views/ai/model/chatRole/ChatRoleForm.vue | 16 +-- src/views/ai/model/chatRole/index.vue | 3 +- 6 files changed, 156 insertions(+), 36 deletions(-) create mode 100644 src/views/ai/chat/components/ChatConversationUpdateForm.vue diff --git a/src/api/ai/chat/conversation/index.ts b/src/api/ai/chat/conversation/index.ts index f0921e83..e0ee8501 100644 --- a/src/api/ai/chat/conversation/index.ts +++ b/src/api/ai/chat/conversation/index.ts @@ -20,12 +20,12 @@ export interface ChatConversationVO { // AI 聊天会话 API export const ChatConversationApi = { - // 获取 Conversation - get: async (id: string) => { - return await request.get({ url: `/ai/chat/conversation/get?id=${id}` }) + // 获得【我的】聊天会话 + getChatConversationMy: async (id: string) => { + return await request.get({ url: `/ai/chat/conversation/get-my?id=${id}` }) }, - // 更新 Conversation - updateConversationMy: async (data: ChatConversationVO) => { + // 更新【我的】聊天会话 + updateChatConversationMy: async (data: ChatConversationVO) => { return await request.put({ url: `/ai/chat/conversation/update-my`, data }) }, diff --git a/src/api/ai/model/chatRole/index.ts b/src/api/ai/model/chatRole/index.ts index e573b667..5e81110b 100644 --- a/src/api/ai/model/chatRole/index.ts +++ b/src/api/ai/model/chatRole/index.ts @@ -9,8 +9,7 @@ export interface ChatRoleVO { category: string // 角色类别 sort: number // 角色排序 description: string // 角色描述 - welcomeMessage: string // 角色欢迎语 - systemMessage: string // 角色上下文 + systemMessage: string // 角色设定 publicStatus: boolean // 是否公开 status: number // 状态 } diff --git a/src/views/ai/chat/components/ChatConversationUpdateForm.vue b/src/views/ai/chat/components/ChatConversationUpdateForm.vue new file mode 100644 index 00000000..0a754dd8 --- /dev/null +++ b/src/views/ai/chat/components/ChatConversationUpdateForm.vue @@ -0,0 +1,124 @@ + + diff --git a/src/views/ai/chat/index.vue b/src/views/ai/chat/index.vue index 306b031a..a1d1816e 100644 --- a/src/views/ai/chat/index.vue +++ b/src/views/ai/chat/index.vue @@ -67,7 +67,8 @@ {{ useConversation?.title }}
- + + @@ -185,6 +186,8 @@ + +