You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The response.text quick accessor only works when the response contains a valid Part, but none was returned. Check the candidate.safety_ratings to see if the response was blocked. #373
The response.text quick accessor only works when the response contains a valid Part, but none was returned. Check the candidate.safety_ratings to see if the response was blocked.
Actual vs expected behavior:
Traceback (most recent call last):
File "D:\Study\codes\Gemini_score.py", line 64, in
strr = str(id) + ":" + response.text
File "D:\Study\codes\venv\lib\site-packages\google\generativeai\types\generation_types.py", line 401, in text
raise ValueError(
ValueError: The response.text quick accessor only works when the response contains a valid Part, but none was returned. Check the candidate.safety_ratings to see if the response was blocked.
Any other information you'd like to share?
THIS IS MY CODES:
import pandas as pd
import pdb
import google.generativeai as genai
import os