diff --git a/src/api/ai/chat/conversation/index.ts b/src/api/ai/chat/conversation/index.ts
index 0834643d..07643255 100644
--- a/src/api/ai/chat/conversation/index.ts
+++ b/src/api/ai/chat/conversation/index.ts
@@ -1,10 +1,10 @@
import request from '@/config/axios'
-// AI 聊天会话 VO
+// AI 聊天对话 VO
export interface ChatConversationVO {
id: string // ID 编号
userId: number // 用户编号
- title: string // 会话标题
+ title: string // 对话标题
pinned: boolean // 是否置顶
roleId: number // 角色编号
modelId: number // 模型编号
@@ -20,24 +20,24 @@ export interface ChatConversationVO {
modelMaxContexts?: string // 模型的上下文的最大 Message 数量
}
-// AI 聊天会话 API
+// AI 聊天对话 API
export const ChatConversationApi = {
- // 获得【我的】聊天会话
+ // 获得【我的】聊天对话
getChatConversationMy: async (id: string) => {
return await request.get({ url: `/ai/chat/conversation/get-my?id=${id}` })
},
- // 新增【我的】聊天会话
+ // 新增【我的】聊天对话
createChatConversationMy: async (data?: ChatConversationVO) => {
return await request.post({ url: `/ai/chat/conversation/create-my`, data })
},
- // 更新【我的】聊天会话
+ // 更新【我的】聊天对话
updateChatConversationMy: async (data: ChatConversationVO) => {
return await request.put({ url: `/ai/chat/conversation/update-my`, data })
},
- // 删除【我的】聊天会话
+ // 删除【我的】聊天对话
deleteChatConversationMy: async (id: string) => {
return await request.delete({ url: `/ai/chat/conversation/delete-my?id=${id}` })
},
@@ -47,8 +47,13 @@ export const ChatConversationApi = {
return await request.delete({ url: `/ai/chat/conversation/delete-my-all-except-pinned` })
},
- // 获得【我的】聊天会话列表
+ // 获得【我的】聊天对话列表
getChatConversationMyList: async () => {
return await request.get({ url: `/ai/chat/conversation/my-list` })
+ },
+
+ // 获得对话分页
+ getChatConversationPage: async (params: any) => {
+ return await request.get({ url: `/ai/chat/conversation/page`, params })
}
}
diff --git a/src/api/ai/chat/message/index.ts b/src/api/ai/chat/message/index.ts
index 0547ab1b..7b46f9c2 100644
--- a/src/api/ai/chat/message/index.ts
+++ b/src/api/ai/chat/message/index.ts
@@ -6,7 +6,7 @@ import { config } from '@/config/axios/config'
// 聊天VO
export interface ChatMessageVO {
id: number // 编号
- conversationId: number // 会话编号
+ conversationId: number // 对话编号
type: string // 消息类型
userId: string // 用户编号
roleId: string // 角色编号
@@ -20,7 +20,7 @@ export interface ChatMessageVO {
}
export interface ChatMessageSendVO {
- conversationId: string // 会话编号
+ conversationId: string // 对话编号
content: number // 聊天内容
}
diff --git a/src/views/ai/chat/Conversation.vue b/src/views/ai/chat/Conversation.vue
index 3c0af731..3a141fd5 100644
--- a/src/views/ai/chat/Conversation.vue
+++ b/src/views/ai/chat/Conversation.vue
@@ -59,7 +59,7 @@
-
+
@@ -296,15 +296,15 @@ const updateConversationTitle = async (conversation: ChatConversationVO) => {
}
/**
- * 删除聊天会话
+ * 删除聊天对话
*/
const deleteChatConversation = async (conversation: ChatConversationVO) => {
try {
// 删除的二次确认
- await message.delConfirm(`是否确认删除会话 - ${conversation.title}?`)
+ await message.delConfirm(`是否确认删除对话 - ${conversation.title}?`)
// 发起删除
await ChatConversationApi.deleteChatConversationMy(conversation.id)
- message.success('会话已删除')
+ message.success('对话已删除')
// 刷新列表
await getChatConversationList()
// 回调
diff --git a/src/views/ai/chat/index.vue b/src/views/ai/chat/index.vue
index d4ca76a8..83231b57 100644
--- a/src/views/ai/chat/index.vue
+++ b/src/views/ai/chat/index.vue
@@ -1,6 +1,6 @@
-
+
-
+