From 761f4d9d3c616347d5ab928297119276992a8a60 Mon Sep 17 00:00:00 2001 From: Eli Bendersky Date: Mon, 24 Jun 2024 07:45:20 -0600 Subject: [PATCH] genai: update Tool example to be more resilient to model differences (#146) --- genai/example_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/genai/example_test.go b/genai/example_test.go index bd9a6a3..3faaafd 100644 --- a/genai/example_test.go +++ b/genai/example_test.go @@ -362,7 +362,7 @@ func ExampleTool() { Properties: map[string]*genai.Schema{ "location": { Type: genai.TypeString, - Description: "The city and state, e.g. San Francisco, CA", + Description: "The city and state, for example 'San Francisco, CA'. Both city and state are mandatory", }, "unit": { Type: genai.TypeString, @@ -380,7 +380,7 @@ func ExampleTool() { }}, } - model := client.GenerativeModel("gemini-1.0-pro") + model := client.GenerativeModel("gemini-1.5-flash-latest") // Before initiating a conversation, we tell the model which tools it has // at its disposal.