mirror of
https://gitee.com/hhyykk/ipms-sjy-ui.git
synced 2025-07-15 19:35:07 +08:00
【新增】AI:对话管理 50%
This commit is contained in:
@ -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 })
|
||||
}
|
||||
}
|
||||
|
@ -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 // 聊天内容
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user