You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
818 B
47 lines
818 B
import { defHttp } from '@/utils/axios/index' |
|
|
|
/** |
|
* @description 对话列表 |
|
*/ |
|
export async function conversationList() { |
|
return defHttp.get({ |
|
url: `/open-chat/chat/conversation/list`, |
|
}) |
|
} |
|
|
|
/** |
|
* @description 对话历史记录 |
|
*/ |
|
export async function historyMessage(data: { |
|
conversationId: string |
|
current: number |
|
size: number |
|
}) { |
|
return defHttp.get({ |
|
url: `/open-chat/chat/chatMessageLog/page`, |
|
data, |
|
}) |
|
} |
|
|
|
/** |
|
* @description 发送消息 |
|
*/ |
|
export async function sendMessage(data: { |
|
roleId: number |
|
conversationId: string |
|
question: string |
|
}) { |
|
return defHttp.post({ |
|
url: `/open-chat/chat/session`, |
|
data, |
|
}) |
|
} |
|
|
|
/** |
|
* @description 获取chat信息 |
|
*/ |
|
export async function chatInfo() { |
|
return defHttp.get({ |
|
url: `/open-chat/chat/ai/getWxUserInfo`, |
|
}) |
|
}
|
|
|