Description of the bug:
When sending some specific conversations to gemini-1.5-flash will get finish_reason: 6, and this finish_reason can't be found in official document:

Why is this cause?
Environment details
- OS type and version: Ubuntu
- Python version: 3.11.9
- pip version: 24.0
- package versions:
google-ai-generativelanguage 0.6.6
google-api-core 2.19.1
google-api-python-client 2.137.0
google-auth 2.32.0
google-auth-httplib2 0.2.0
google-generativeai 0.7.2
Code example
GEMINI_MODEL = ChatGoogleGenerativeAI(
model="gemini-1.5-flash",
temperature=0,
)
prompt = ChatPromptTemplate.from_template(prompt_tmpl)
chain = prompt | GEMINI_MODEL | StrOutputParser()
response = chain.invoke(prompt_parmas)
Error trace
[2024-07-19 10:51:30,697] [langchain_google_genai.chat_models | line:561 | _response_to_result] [ERROR] - response: candidates {
index: 0
finish_reason: 6
}
usage_metadata {
prompt_token_count: 1961
total_token_count: 1961
}
Actual vs expected behavior:
No response
Any other information you'd like to share?
No response
Description of the bug:
When sending some specific conversations to

gemini-1.5-flashwill get finish_reason: 6, and this finish_reason can't be found in official document:Why is this cause?
Environment details
google-ai-generativelanguage 0.6.6
google-api-core 2.19.1
google-api-python-client 2.137.0
google-auth 2.32.0
google-auth-httplib2 0.2.0
google-generativeai 0.7.2
Code example
Error trace
Actual vs expected behavior:
No response
Any other information you'd like to share?
No response