diff --git a/core/llm/llms/Anthropic.ts b/core/llm/llms/Anthropic.ts index 00a97b826..e194f5ddc 100644 --- a/core/llm/llms/Anthropic.ts +++ b/core/llm/llms/Anthropic.ts @@ -214,8 +214,7 @@ class Anthropic extends BaseLLM { }); if (response.status === 499) { - // Aborted by user - return; + return; // Aborted by user } if (!response.ok) { diff --git a/core/llm/llms/Gemini.ts b/core/llm/llms/Gemini.ts index 4e8d4ff49..3a9a6145a 100644 --- a/core/llm/llms/Gemini.ts +++ b/core/llm/llms/Gemini.ts @@ -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 }; diff --git a/core/llm/llms/Ollama.ts b/core/llm/llms/Ollama.ts index 398f42ae5..ccfdbe78a 100644 --- a/core/llm/llms/Ollama.ts +++ b/core/llm/llms/Ollama.ts @@ -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); diff --git a/core/llm/llms/OpenAI.ts b/core/llm/llms/OpenAI.ts index 4c476f45a..3d0daac07 100644 --- a/core/llm/llms/OpenAI.ts +++ b/core/llm/llms/OpenAI.ts @@ -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;