langchaingo icon indicating copy to clipboard operation
langchaingo copied to clipboard

googleapi/vertex: fix multi-tool call error, Invalid argument

Open CloudAceEmma opened this issue 1 year ago • 3 comments

PR Checklist

  • [x] Read the Contributing documentation.
  • [x] Read the Code of conduct documentation.
  • [x] Name your Pull Request title clearly, concisely, and prefixed with the name of the primarily affected package you changed according to Good commit messages (such as memory: add interfaces for X, Y or util: add whizzbang helpers).
  • [x] Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • [x] Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. Fixes #123).
  • [x] Describes the source of new concepts.
  • [x] References existing implementations as appropriate.
  • [x] Contains test coverage for new functions.
  • [x] Passes all golangci-lint checks.

This PR fix Invalid argument error when using multiple tools, google genai only support one tool, multiple tools must be embedded into function declarations, cc @eliben, see also: https://github.com/GoogleCloudPlatform/generative-ai/issues/636 https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/function-calling#chat-samples

CloudAceEmma avatar Sep 21 '24 09:09 CloudAceEmma

LGTM

@tmc to merge

eliben avatar Sep 24 '24 12:09 eliben

When will this be merged, struggling with the same issue? @eliben any idea?

nilpntr avatar Apr 22 '25 15:04 nilpntr

Any updates @CloudAceEmma @eliben @tmc ?

nilpntr avatar Apr 30 '25 09:04 nilpntr