Open dudizimber opened 5 months ago
Can you please provide code that is causing this issue for you so that I can help you?
Are you using send_message
or generate_content
?
Responses lack candidates when they are blocked. A blocked response results in exception when using ChatSession. If you want to manually handle blocked responses, please use generate_content
instead of send_message
.
https://github.com/googleapis/python-aiplatform/blame/b8b589ce9fff29d1721450d32b4a84a7f69413c3/vertexai/generative_models/_generative_models.py#L920
The above line throws a
list index out of range
error when the response returns with no candidates.