refac: cancel download

This commit is contained in:
Timothy J. Baek 2024-03-23 13:12:23 -07:00
parent 642ca5a94a
commit 244f34c24e
5 changed files with 93 additions and 53 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}`, {