You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I thought a tool was supposed to be a group of related functions. The functions I have are completely unrelated, so I thought I was supposed to do it this way.
As a workaround I can try stuffing them all the functions into a single tool.
Client
vertexai/genai
Environment
Local running on Mac OS X
Go Environment
go version
go version go1.22.2 darwin/arm64
go env
GO111MODULE='on'
GOARCH='arm64'
GOBIN=''
GOCACHE='/Users/mrothroc/Library/Caches/go-build'
GOENV='/Users/mrothroc/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/mrothroc/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='darwin'
GOPATH='/Users/mrothroc/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/opt/homebrew/opt/go/libexec'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/opt/homebrew/opt/go/libexec/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.22.2'
GCCGO='gccgo'
AR='ar'
CC='cc'
CXX='c++'
CGO_ENABLED='1'
GOMOD='/Users/mrothroc/IdeaProjects/scrapertest2/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/5c/cwjs85zx5f73qtn3mv7_zh3r0000gn/T/go-build3282724130=/tmp/go-build -gno-record-gcc-switches -fno-common'
Code
Expected behavior
Call to vertexai to work without an error.
Actual behavior
Error code returned:
rpc error: code = InvalidArgument desc = Request contains an invalid argument.
Additional context
I have validated that providing either tool alone works, so the declaration is valid.
E.g.
gemini.Tools = []*genai.Tool{toolSet[0].GetDeclaration()}
and
gemini.Tools = []*genai.Tool{toolSet[1].GetDeclaration()}
both work without error, but
gemini.Tools = []*genai.Tool{toolSet[0].GetDeclaration(), toolSet[1].GetDeclaration()}
fails with the above error.
The text was updated successfully, but these errors were encountered: