From b8a453b423e9b13c4d19d97f5742ae0a7c0f86c7 Mon Sep 17 00:00:00 2001 From: alisalim17 Date: Mon, 29 Apr 2024 16:49:07 +0400 Subject: [PATCH] fix: stream only when it's enabled --- libs/superagent/app/agents/llm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/superagent/app/agents/llm.py b/libs/superagent/app/agents/llm.py index 4a8e1269b..8fb4f167f 100644 --- a/libs/superagent/app/agents/llm.py +++ b/libs/superagent/app/agents/llm.py @@ -277,7 +277,7 @@ async def _completion(self, **kwargs) -> Any: output = self._cleanup_output(output) - if not self._stream_directly: + if not self._stream_directly and self.enable_streaming: await self._stream_by_lines(output) if self.enable_streaming: