Open blopa opened 4 days ago
I think this is intended. Flash model don't support forced function calling with "ANY" parameter.
The tool configuration's ANY mode ("forced function calling") is a Preview feature. It is supported for Gemini 1.5 Pro models only.
https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/function-calling
Description of the bug:
Hi. I have a function that consistently return a correct JSON from my function call if I use
gemini-1.5-pro
, but if I change it togemini-1.5-flash
, I suddenly get no function calls and have all the responses on thetext
property.This is my code:
@google/generative-ai
version:0.14.0
node.js
version:21.6
Actual vs expected behavior:
Expected:
Get my JSON result inside
result?.response?.candidates?.[0]?.content?.parts?.[0]?.functionCall?.args
usinggemini-1.5-flash
orgemini-1.5-pro
.Actual
I get the result inside
result?.response?.candidates?.[0]?.content?.parts?.[0]?.text
usinggemini-1.5-flash
.Any other information you'd like to share?
No response