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
- adds more detail in the warning message when the gemini model response
has no output in parts but may still have candidate answers generated
- fixes the logic around retrying calls for EndpointModels
---------
Co-authored-by: Besmira Nushi <[email protected]>
f"Attempt failed due to explicitly blocked input prompt: {e} Block Reason {self.gemini_response.prompt_feedback.block_reason}"
660
660
)
661
661
returnTrue
662
-
# Handling cases where the model implicitly blocks prompts and does not provide a reason for it but rather an empty content.
662
+
# Handling cases where the model implicitly blocks prompts and does not provide an explicit block reason for it but rather an empty content.
663
663
# In these cases, there is no need to make a new attempt as the model will continue to implicitly block the request, do_return = True.
664
+
# Note that, in some cases, the model may still provide a finish reason as shown here https://ai.google.dev/api/generate-content?authuser=2#FinishReason
0 commit comments