Skip to content

Commit

Permalink
genai: update Tool example to be more resilient to model differences (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
eliben committed Jun 24, 2024
1 parent bffd28b commit 761f4d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions genai/example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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.
Expand Down

0 comments on commit 761f4d9

Please sign in to comment.