Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tool_choice doesnt work on gemini-1.5-flash but works on gemini-1.5-pro #440

Open
HiraveBapu opened this issue Aug 15, 2024 · 3 comments
Open
Assignees

Comments

@HiraveBapu
Copy link

model = llm.bind_tools(tools=tools,tool_choice="add")

error: Retrying langchain_google_vertexai.chat_models._acompletion_with_retry.._completion_with_retry_inner in 10.0 seconds as it raised InvalidArgument: 400 Request contains an invalid argument.

langchain-google-vertexai = "^1.0.8"
langchain-core = "^0.2.32"

@langcarl langcarl bot added the investigate label Aug 15, 2024
@lkuligin
Copy link
Collaborator

The tool configuration's ANY mode ("forced function calling") is supported for Gemini 1.5 Pro models only.

https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/function-calling#tool-config

@efriis efriis assigned lkuligin and unassigned efriis Sep 3, 2024
@efriis
Copy link
Member

efriis commented Sep 3, 2024

@lkuligin maybe it's worth not retrying and instead passing through the error for this class of error? The error message could also probably be improved

@itsparser
Copy link

anyone working on this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants