From d50a7bc02d89e14beeab83a28f0d3677dbd9f0ef Mon Sep 17 00:00:00 2001 From: zhangxiao <898441624@qq.com> Date: 星期五, 30 八月 2024 14:31:50 +0800 Subject: [PATCH] fix: 修改bug --- src/api/session.ts | 38 ++++++++++++++++++++++++++++++++++---- 1 files changed, 34 insertions(+), 4 deletions(-) diff --git a/src/api/session.ts b/src/api/session.ts index cd16412..6f221f3 100644 --- a/src/api/session.ts +++ b/src/api/session.ts @@ -8,13 +8,19 @@ // 浼氳瘽鍒楄〃 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 } ); } @@ -43,7 +49,7 @@ } // 鑾峰彇鏅鸿兘鍔╂墜鍒楄〃 export function getDialogListApi() { - return axios.get<ISessionListResult>('/api/dialog/list'); + return axios.get<ISessionListResult>('/api/v1/dialog/list'); } @@ -55,4 +61,28 @@ }, }; return axios.post('/api/v1/document/upload_without_kb', params, config); -} \ No newline at end of file +} + +// 鑾峰彇瑙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); +} + +//楂樼骇浼氳瘽 +export function seniorAgentApi(params) { + return axios.get<ISessionListResult>( + '/api/v1/advanced-agent/list', + params + ); +} -- Gitblit v1.8.0