diff --git a/application/tools/agent.py b/application/tools/agent.py index e02c40f7..ab797992 100644 --- a/application/tools/agent.py +++ b/application/tools/agent.py @@ -120,7 +120,9 @@ class Agent: def gen(self, messages): # Generate initial response from the LLM if self.llm.supports_tools(): - self._simple_tool_agent(messages) + resp = self._simple_tool_agent(messages) + for line in resp: + yield line else: resp = self.llm.gen_stream(model=self.gpt_model, messages=messages) for line in resp: