From a010f290134d6b47b18287f59099b71d50e65314 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20K=C5=99=C3=ADstek?= <77566262+David-Kristek@users.noreply.github.com> Date: Mon, 1 Jan 2024 23:03:53 +0100 Subject: [PATCH] fix: call correct stream method in ollama (#15104) Co-authored-by: David Kristek --- libs/community/langchain_community/llms/ollama.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/community/langchain_community/llms/ollama.py b/libs/community/langchain_community/llms/ollama.py index afe0aed5711..022422417ed 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