Merge pull request #1272 from anuraagdjain/feat/cancel-model-download

feat: cancel model download
This commit is contained in:
Timothy Jaeryang Baek 2024-03-24 18:00:57 -05:00 committed by GitHub
commit a1faa307b1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 120 additions and 28 deletions

View file

@ -271,7 +271,7 @@ export const generateChatCompletion = async (token: string = '', body: object) =
return [res, controller];
};
export const cancelChatCompletion = async (token: string = '', requestId: string) => {
export const cancelOllamaRequest = async (token: string = '', requestId: string) => {
let error = null;
const res = await fetch(`${OLLAMA_API_BASE_URL}/cancel/${requestId}`, {