mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-08-04 06:40:29 +08:00
Refa: align chat and search restful APIs (#14229)
### What problem does this PR solve? Refactor /api/v1/chats to be more RESTful. ### Type of change - [x] Refactoring --------- Co-authored-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
@@ -52,7 +52,7 @@ export default {
|
||||
// plugin
|
||||
llmTools: `${webAPI}/plugin/llm_tools`,
|
||||
|
||||
chatsTranscriptions: `${restAPIv1}/chats/transcriptions`,
|
||||
chatsTranscriptions: `${restAPIv1}/chat/audio/transcription`,
|
||||
|
||||
// knowledge base
|
||||
|
||||
@@ -147,12 +147,12 @@ export default {
|
||||
`${restAPIv1}/chats/${chatId}/sessions/${sessionId}/messages/${msgId}`,
|
||||
thumbup: (chatId: string, sessionId: string, msgId: string) =>
|
||||
`${restAPIv1}/chats/${chatId}/sessions/${sessionId}/messages/${msgId}/feedback`,
|
||||
completionUrl: (chatId: string, sessionId: string) =>
|
||||
`${restAPIv1}/chats/${chatId}/sessions/${sessionId}/completions`,
|
||||
chatsTts: `${restAPIv1}/chats/tts`,
|
||||
ask: `${restAPIv1}/chats/ask`,
|
||||
chatsMindmap: `${restAPIv1}/chats/mindmap`,
|
||||
chatsRelatedQuestions: `${restAPIv1}/chats/related_questions`,
|
||||
completionUrl: `${restAPIv1}/chat/completions`,
|
||||
chatsTts: `${restAPIv1}/chat/audio/speech`,
|
||||
searchCompletion: (searchId: string) =>
|
||||
`${restAPIv1}/searches/${searchId}/completion`,
|
||||
chatsMindmap: `${restAPIv1}/chat/mindmap`,
|
||||
chatsRelatedQuestions: `${restAPIv1}/chat/recommandation`,
|
||||
|
||||
// next chat
|
||||
fetchExternalChatInfo: (id: string) => `${restAPIv1}/chatbots/${id}/info`,
|
||||
|
||||
Reference in New Issue
Block a user