Merge pull request #1060 from chhao01/patch-1

[bug]TypeError: object of type 'NoneType' has no len()
This commit is contained in:
Mark Backman
2025-01-22 19:14:35 -05:00
committed by GitHub

View File

@@ -221,7 +221,7 @@ class BaseOpenAILLMService(LLMService):
)
await self.start_llm_usage_metrics(tokens)
if len(chunk.choices) == 0:
if chunk.choices is None or len(chunk.choices) == 0:
continue
await self.stop_ttfb_metrics()