liudong
2024-08-26 6de5b976d19efff381381470e55fef8c469f87ab
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
import axios from 'axios';
 
export interface ISessionListResult {
  code: number;
  msg: string;
  data: any;
}
// 会话列表
// export function sessionListApi(dialog_id) {
//   return axios.get<ISessionListResult>(
//     "/api/conversation/list?modeltype=localragflow&dialogid=" + dialog_id
//   );
// }
// 删除会话
// export function deleteSessionApi(conversation_ids: string[]) {
//   return axios.post<ISessionListResult>(
//     '/api/conversation/del?modeltype=localragflow',
//     { conversation_ids }
//   );
// }
// 新增会话
// export function addSessionApi(params: any) {
//   return axios.get<ISessionListResult>(
//     '/api/getConId/kdwithai?platform=localragflow',
//     { params }
//   );
// }
// 获取智能助手列表
// export function getDialogListApi() {
//   return axios.get<ISessionListResult>('/api/dialog/list');
// }
 
// 聊天
export function chatAgentApi(data) {
  return axios.post(
    '/api/v1/canvas/completion',
    data
  );
}
 
// 获取会话详情
export function getAgentSessionDetailsApi(id: string) {
  return axios.get(
    '/api/v1/canvas/get/' + id,
    {}
  );
}
// 设置
export function agentSetApi(data) {
  return axios.post(
    '/api/v1/canvas/set',
    data
  );
}
// 重置
export function agentResetApi(data) {
  return axios.post(
    '/api/v1/canvas/reset',
    data
  );
}