From 1da0bc255179f25b5227bec27833cf486cb6cb90 Mon Sep 17 00:00:00 2001 From: yinbangzhong <zhongbangyin@126.com> Date: 星期二, 10 九月 2024 19:41:40 +0800 Subject: [PATCH] agent会话 --- src/api/session.ts | 62 ++++++++++++++++++++++++++++++- 1 files changed, 60 insertions(+), 2 deletions(-) diff --git a/src/api/session.ts b/src/api/session.ts index e7ab8ab..ccdf1e5 100644 --- a/src/api/session.ts +++ b/src/api/session.ts @@ -20,7 +20,7 @@ // 鍒犻櫎浼氳瘽 export function deleteSessionApi(conversation_ids: string[]) { return axios.post<ISessionListResult>( - '/api/conversation/del?modeltype=localragflow', + '/api/v1/conversation/rm?modeltype=localragflow', { conversation_ids } ); } @@ -61,4 +61,62 @@ }, }; return axios.post('/api/v1/document/upload_without_kb', params, config); -} \ No newline at end of file +} + + +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); +} + + +// 鑾峰彇瑙f瀽鏂规硶鍒楄〃 +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); +} +//涓婁紶瑙f瀽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 + ); +} -- Gitblit v1.8.0