From b9bfd6535e15d700f469c25008dfb323e28dbfaa Mon Sep 17 00:00:00 2001 From: zhangxiao <898441624@qq.com> Date: 星期二, 27 八月 2024 14:23:25 +0800 Subject: [PATCH] fix: 修改bug --- src/api/session.ts | 36 +++++++++++++++++++++++++++++------- 1 files changed, 29 insertions(+), 7 deletions(-) diff --git a/src/api/session.ts b/src/api/session.ts index ce11bb4..70d0b9e 100644 --- a/src/api/session.ts +++ b/src/api/session.ts @@ -6,23 +6,29 @@ data: any; } // 浼氳瘽鍒楄〃 -export function sessionListApi() { +export function sessionListApi(dialog_id) { return axios.get<ISessionListResult>( - '/api/conversation/list?modeltype=localragflow' + "/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 addSessionApi(params: any) { - return axios.get<ISessionListResult>( - '/api/getConId/kdwithai?platform=localragflow', - { params } + return axios.post<ISessionListResult>( + '/api/v1/conversation/set?platform=localragflow', + params ); } @@ -43,5 +49,21 @@ } // 鑾峰彇鏅鸿兘鍔╂墜鍒楄〃 export function getDialogListApi() { - return axios.get<ISessionListResult>('/api/dialog/list'); + return axios.get<ISessionListResult>('/api/v1/dialog/list'); } + + +export function uploadWithoutKb(params) { + const config = { + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + // token: token, + }, + }; + return axios.post('/api/v1/document/upload_without_kb', params, config); +} + +// 鑾峰彇瑙f瀽鏂规硶鍒楄〃 +export function getParseMethodsListApi() { + return axios.get<ISessionListResult>('/api/v1/user/parse-methods'); +} \ No newline at end of file -- Gitblit v1.8.0