Revert "Refa: Chats /chat API to RESTFul (#13871)" (#13877)

### What problem does this PR solve?

This reverts commit 1a608ac411.

### Type of change

- [x] Other (please describe):
This commit is contained in:
Liu An
2026-04-01 11:05:29 +08:00
committed by GitHub
parent 1a608ac411
commit b1d28b5898
52 changed files with 3584 additions and 2044 deletions

View File

@@ -128,13 +128,10 @@ export default {
get_dataset_filter: `${api_host}/document/filter`,
// chat
createChat: `${ExternalApi}${api_host}/chats`,
listChats: `${ExternalApi}${api_host}/chats`,
getChat: (chatId: string) => `${ExternalApi}${api_host}/chats/${chatId}`,
updateChat: (chatId: string) => `${ExternalApi}${api_host}/chats/${chatId}`,
patchChat: (chatId: string) => `${ExternalApi}${api_host}/chats/${chatId}`,
deleteChat: (chatId: string) => `${ExternalApi}${api_host}/chats/${chatId}`,
bulkDeleteChats: `${ExternalApi}${api_host}/chats`,
setDialog: `${api_host}/dialog/set`,
getDialog: `${api_host}/dialog/get`,
removeDialog: `${api_host}/dialog/rm`,
listDialog: `${api_host}/dialog/list`,
setConversation: `${api_host}/conversation/set`,
getConversation: `${api_host}/conversation/get`,
getConversationSSE: (dialogId: string) =>
@@ -159,6 +156,7 @@ export default {
uploadAndParseExternal: `${api_host}/api/document/upload_and_parse`,
// next chat
listNextDialog: `${api_host}/dialog/next`,
fetchExternalChatInfo: (id: string) =>
`${ExternalApi}${api_host}/chatbots/${id}/info`,

View File

@@ -79,7 +79,7 @@ const modelParamMap: ModelParamMap = {
// API endpoint whitelist - only these endpoints will have tenant parameters added
const API_WHITELIST = [
'/v1/user/set_tenant_info',
'/api/v1/chats',
'/v1/dialog/set',
'/v1/canvas/set',
'/v1/canvas/setting',
'/api/v1/searches/',