Skip to content

The agent engineering platform.

fix: call correct stream method in ollama (#15104)

David Křísteka010f290134d
diff --git a/libs/community/langchain_community/llms/ollama.py b/libs/community/langchain_community/llms/ollama.py
index afe0aed571..022422417e 100644
--- a/libs/community/langchain_community/llms/ollama.py
+++ b/libs/community/langchain_community/llms/ollama.py
@@ -440,7 +440,7 @@ class Ollama(BaseLLM, _OllamaCommon):
run_manager: Optional[CallbackManagerForLLMRun] = None,
**kwargs: Any,
) -> Iterator[GenerationChunk]:
- for stream_resp in self._create_stream(prompt, stop, **kwargs):
+ for stream_resp in self._create_generate_stream(prompt, stop, **kwargs):
if stream_resp:
chunk = _stream_response_to_generation_chunk(stream_resp)
yield chunk