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

Co-authored-by: David Kristek <david@David--MacBook-Pro.local>
This commit is contained in:
David Křístek
2024-01-01 23:03:53 +01:00
committed by GitHub
parent c2c2f252c2
commit a010f29013

View File

@@ -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