This commit is contained in:
Dallin Romney 2025-05-16 10:29:40 -07:00
parent 07313a0c16
commit 8f3ee86d50
4 changed files with 4 additions and 8 deletions

View file

@ -214,8 +214,7 @@ class Anthropic extends BaseLLM {
});
if (response.status === 499) {
// Aborted by user
return;
return; // Aborted by user
}
if (!response.ok) {

View file

@ -439,8 +439,7 @@ class Gemini extends BaseLLM {
signal,
});
if (response.status === 499) {
// Aborted by user
return;
return; // Aborted by user
}
const data = await response.json();
yield { role: "assistant", content: data.candidates[0].content };

View file

@ -458,8 +458,7 @@ class Ollama extends BaseLLM implements ModelInstaller {
if (chatOptions.stream === false) {
if (response.status === 499) {
// Aborted by user
return;
return; // Aborted by user
}
const json = (await response.json()) as OllamaChatResponse;
yield convertChatMessage(json);

View file

@ -353,8 +353,7 @@ class OpenAI extends BaseLLM {
// Handle non-streaming response
if (body.stream === false) {
if (response.status === 499) {
// Aborted by user
return;
return; // Aborted by user
}
const data = await response.json();
yield data.choices[0].message;