Update openai.py

This commit is contained in:
RonakAgarwalVani
2024-10-30 14:26:49 +05:30
committed by GitHub
parent 8186e423de
commit d1396bf618

View File

@@ -223,6 +223,9 @@ class BaseOpenAILLMService(LLMService):
await self.stop_ttfb_metrics()
if not chunk.choices[0].delta:
continue
if chunk.choices[0].delta.tool_calls:
# We're streaming the LLM response to enable the fastest response times.
# For text, we just yield each chunk as we receive it and count on consumers