| | |
| | | // 会话列表 |
| | | export function sessionListApi(dialog_id) { |
| | | return axios.get<ISessionListResult>( |
| | | "/api/conversation/list?modeltype=localragflow&dialogid=" + dialog_id |
| | | "/api/conversation/list?modeltype=localragflow&dialogid=" + dialog_id, |
| | | ); |
| | | } |
| | | // 会话列表分页 |
| | | export function sessionListApiPage(data) { |
| | | return axios.get<ISessionListResult>( |
| | | `/api/conversation/list?modeltype=localragflow&dialogid=&page=${data.page}&per_page=${data.page_size}`, |
| | | ); |
| | | } |
| | | // 删除会话 |
| | | export function deleteSessionApi(conversation_ids: string[]) { |
| | | return axios.post<ISessionListResult>( |
| | | '/api/conversation/del?modeltype=localragflow', |
| | | '/api/v1/conversation/rm?modeltype=localragflow', |
| | | { conversation_ids } |
| | | ); |
| | | } |
| | |
| | | } |
| | | // 获取智能助手列表 |
| | | export function getDialogListApi() { |
| | | return axios.get<ISessionListResult>('/api/dialog/list'); |
| | | return axios.get<ISessionListResult>('/api/v1/dialog/list'); |
| | | } |
| | | |
| | | |
| | |
| | | }, |
| | | }; |
| | | return axios.post('/api/v1/document/upload_without_kb', params, config); |
| | | } |
| | | } |
| | | |
| | | |
| | | export function upload_and_parse(params) { |
| | | const config = { |
| | | headers: { |
| | | 'Content-Type': 'application/x-www-form-urlencoded', |
| | | // token: token, |
| | | }, |
| | | }; |
| | | return axios.post('/api/v1/document/upload_and_parse', params, config); |
| | | } |
| | | |
| | | |
| | | export function getDocumentStatus(doc_ids) { |
| | | let params = { "doc_ids": doc_ids }; |
| | | return axios.post("/api/v1/document/infos", params); |
| | | } |
| | | |
| | | |
| | | // 获取解析方法列表 |
| | | export function getParseMethodsListApi() { |
| | | return axios.get<ISessionListResult>('/api/v1/user/parse-methods'); |
| | | } |
| | | |
| | | // 上传v1/document/upload_and_parse |
| | | export function uploadAndParse(params) { |
| | | const config = { |
| | | headers: { |
| | | 'Content-Type': 'application/x-www-form-urlencoded', |
| | | // token: token, |
| | | }, |
| | | }; |
| | | return axios.post('/api/v1/document/upload_and_parse', params, config); |
| | | } |
| | | //上传解析v1/document/infos |
| | | |
| | | export function chatInfos(data: { doc_ids: Array }) { |
| | | return axios.post<ISessionListResult>( |
| | | '/api/v1/document/infos', |
| | | data |
| | | ); |
| | | } |
| | | |
| | | //上传删除文档v1/document/rm |
| | | export function chatRm(data: { doc_id: Array }) { |
| | | return axios.post<ISessionListResult>( |
| | | '/api/v1/document/rm', |
| | | data |
| | | ); |
| | | } |
| | | |
| | | //高级会话 |
| | | export function seniorAgentApi(params) { |
| | | return axios.get<ISessionListResult>( |
| | | '/api/v1/advanced-agent/list', |
| | | params |
| | | ); |
| | | } |