mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-02-18 16:38:10 +01:00
feat(api-endpoints.ts): add abortRequest endpoint
feat(data-service.ts): add abortRequestWithMessage function feat(react-query-service.ts): add useAbortRequestWithMessage hook
This commit is contained in:
parent
f946f90ef6
commit
828e438d53
3 changed files with 12 additions and 0 deletions
|
|
@ -6,6 +6,10 @@ export function getConversations(pageNumber: string): Promise<t.TGetConversation
|
|||
return request.get(endpoints.conversations(pageNumber));
|
||||
}
|
||||
|
||||
export function abortRequestWithMessage(endpoint: string, abortKey: string, message: string): Promise<void> {
|
||||
return request.post(endpoints.abortRequest(endpoint), { arg: {abortKey, message} });
|
||||
}
|
||||
|
||||
export function deleteConversation(payload: t.TDeleteConversationRequest) {
|
||||
//todo: this should be a DELETE request
|
||||
return request.post(endpoints.deleteConversation(), {arg: payload});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue