mirror of
https://github.com/arc53/DocsGPT.git
synced 2025-11-30 09:03:15 +00:00
enhancement: implement api client in remaining places
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
const endpoints = {
|
||||
USER: {
|
||||
DOCS: '/api/combine',
|
||||
DOCS_CHECK: '/api/docs_check',
|
||||
API_KEYS: '/api/get_api_keys',
|
||||
CREATE_API_KEY: '/api/create_api_key',
|
||||
DELETE_API_KEY: '/api/delete_api_key',
|
||||
@@ -9,14 +11,22 @@ const endpoints = {
|
||||
UPDATE_PROMPT: '/api/update_prompt',
|
||||
SINGLE_PROMPT: (id: string) => `/api/get_single_prompt?id=${id}`,
|
||||
DELETE_PATH: (docPath: string) => `/api/delete_old?path=${docPath}`,
|
||||
TASK_STATUS: (task_id: string) => `/api/task_status?task_id=${task_id}`,
|
||||
},
|
||||
CONVERSATION: {
|
||||
ANSWER: '/api/answer',
|
||||
ANSWER_STREAMING: '/stream',
|
||||
SEARCH: '/api/search',
|
||||
FEEDBACK: '/api/feedback',
|
||||
CONVERSATION: (id: string) => `/api/get_single_conversation?id=${id}`,
|
||||
CONVERSATIONS: '/api/get_conversations',
|
||||
SHARE_CONVERSATION: (isPromptable: boolean) =>
|
||||
`/api/share?isPromptable=${isPromptable}`,
|
||||
SHARED_CONVERSATION: (identifier: string) =>
|
||||
`/api/shared_conversation/${identifier}`,
|
||||
DELETE: (id: string) => `/api/delete_conversation?id=${id}`,
|
||||
DELETE_ALL: '/api/delete_all_conversations',
|
||||
UPDATE: '/api/update_conversation_name',
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user