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

type Tool example fails #160

Closed
mskyan opened this issue Jul 6, 2024 · 1 comment · Fixed by #163
Closed

type Tool example fails #160

mskyan opened this issue Jul 6, 2024 · 1 comment · Fixed by #163
Labels
type:api-issue issue with the underlying API/service type:bug Something isn't working

Comments

@mskyan
Copy link

mskyan commented Jul 6, 2024

Description of the bug:

https://pkg.go.dev/github.com/google/generative-ai-go@v0.16.0/genai#example-Tool

OS: Windows 10
Go: 1.22.4

at this line:
res, err := session.SendMessage(ctx, genai.Text("What is the weather like in New York?"))
if err != nil {
log.Fatal(err)
}

returns "googleapi: Error 400: exit status 1"

Actual vs expected behavior:

no error

Any other information you'd like to share?

Confirmed same GOOGLE_API_KEY working on a Python code.
https://colab.research.google.com/github/google/generative-ai-docs/blob/main/site/en/gemini-api/docs/function-calling/python.ipynb

@mskyan mskyan added the type:bug Something isn't working label Jul 6, 2024
@eliben eliben added the type:api-issue issue with the underlying API/service label Jul 9, 2024
@eliben
Copy link
Member

eliben commented Jul 9, 2024

I confirm I can see this too - investigating

eliben added a commit that referenced this issue Jul 9, 2024
The model/API is sensitive to our weather example and emit 400s occasionally.

Reuse the movies example from the official docs (https://ai.google.dev/gemini-api/docs/function-calling) instead

Fixes #160
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:api-issue issue with the underlying API/service type:bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants