tmc / langchaingo

LangChain for Go, the easiest way to write LLM-based programs in Go
https://tmc.github.io/langchaingo/
MIT License
5k stars 642 forks source link

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

Open CloudAceEmma opened 2 months ago

CloudAceEmma commented 2 months ago

PR Checklist

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

eliben commented 2 months ago

LGTM

@tmc to merge