diff --git a/core/llm/llms/Ollama.ts b/core/llm/llms/Ollama.ts index 675fd8663..1a409c5f9 100644 --- a/core/llm/llms/Ollama.ts +++ b/core/llm/llms/Ollama.ts @@ -359,6 +359,7 @@ class Ollama extends BaseLLM implements ModelInstaller{ if ("error" in j) { throw new Error(j.error); } + j.response ??= '' yield j.response; } catch (e) { throw new Error(`Error parsing Ollama response: ${e} ${chunk}`);