feat(genai): Add function calling config sample#5613
Conversation
|
Warning Gemini encountered an error creating the review. You can try again by commenting |
6059f3d to
117c504
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a new example demonstrating how to configure Gemini function calling using genai.FunctionCallingConfig, along with a corresponding test case. The review feedback suggests adding region tags for documentation, correcting several typos in variable names, descriptions, and error messages, and ensuring all output is written to the provided io.Writer instead of standard output for better testability.
e8583aa to
cd98356
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a new example demonstrating how to configure function calling with the Gemini model. Specifically, it adds genai/tools/tools_func_calling_config.go containing the generateWithFuncCallConfig function, which sets up a function declaration and restricts the model to only use that function using FunctionCallingConfig. Additionally, a corresponding unit test has been added to genai/tools/tools_examples_test.go to verify the behavior. I have no feedback to provide.
Kef131
left a comment
There was a problem hiding this comment.
Great sample, it is consistent with others samples
|
Here is the summary of changes. You are about to add 1 region tag.
This comment is generated by snippet-bot.
|
6d23394 to
a59985c
Compare
a59985c to
b0dc66b
Compare
Description
implemented a new sample that migrate existing logic to the genai library, ensuring full alignment with the provided other language examples. https://docs.cloud.google.com/gemini-enterprise-agent-platform/reference/models/function-calling.md#advanced-use
Fixes Internal b/527541512
Checklist
go test -v ./..(see Testing)gofmt(see Formatting)go vet(see Formatting)