Closed Pratik-Kumar-Cse closed 2 months ago
There are some improved error messages in: https://github.com/google-gemini/generative-ai-python/pull/527
What was in response.prompt_feedback
? Was it empty?
Unless there's something new, let's call this a duplicate of #170, with https://github.com/google-gemini/generative-ai-python/pull/527 as a fix.
when I try to access the response.text then this error message will come but I am able to access token used
Description of the bug:
Invalid operation: The
response.parts
quick accessor requires a single candidate, but none were returned. Please check theresponse.prompt_feedback
to determine if the prompt was blocked.Actual vs expected behavior:
I am calling the llm using image and video like this
response = model.generate_content( [prompt, video_file], request_options={"timeout": 600}, safety_settings=safety_settings, )
Any other information you'd like to share?
No response