diff --git a/servers/fastapi/services/llm_client.py b/servers/fastapi/services/llm_client.py index def6a9d5..3bc9399c 100644 --- a/servers/fastapi/services/llm_client.py +++ b/servers/fastapi/services/llm_client.py @@ -950,7 +950,11 @@ class LLMClient: max_output_tokens=max_tokens, ), ): - if not (event.candidates and event.candidates[0].content): + if not ( + event.candidates + and event.candidates[0].content + and event.candidates[0].content.parts + ): continue generated_contents.append(event.candidates[0].content)