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.
57 lines
1.1 KiB
57 lines
1.1 KiB
import request from '@/utils/request'
|
|
import {postStream} from '@/utils/request'
|
|
|
|
|
|
|
|
export function listChatHistory(sessionId) {
|
|
if (sessionId === ''){
|
|
sessionId = '0'
|
|
}
|
|
return request({
|
|
url: '/default-api/aichat/session/list/'+sessionId,
|
|
method: 'get',
|
|
params: {}
|
|
})
|
|
}
|
|
|
|
export function getChatList(data) {
|
|
return request({
|
|
url: '/default-api/aichat/chat/list',
|
|
method: 'get',
|
|
params: data
|
|
})
|
|
}
|
|
|
|
export function postChatMessage(data,signal) {
|
|
return postStream('/aichat-api/robot/robot_chat',data,signal)
|
|
}
|
|
|
|
export function DeleteChatSession(sessionId) {
|
|
return request({
|
|
url: '/default-api/aichat/delete/session/'+sessionId,
|
|
method: 'post'
|
|
})
|
|
}
|
|
|
|
export function updateChat(data) {
|
|
return request({
|
|
url: '/default-api/aichat/update',
|
|
method: 'post',
|
|
data: data
|
|
})
|
|
}
|
|
|
|
export async function addChat(data) {
|
|
return request({
|
|
url: '/default-api/aichat/add',
|
|
method: 'post',
|
|
data: data
|
|
})
|
|
}
|
|
export async function postDataQuery(data) {
|
|
return request({
|
|
url: '/dataquery-api/datachat',
|
|
method: 'post',
|
|
data: data
|
|
})
|
|
}
|
|
|