Skip to content

Commit f6e6852

Browse files
committed
fix(genai): rollback model updates for function calling
1 parent 93a6078 commit f6e6852

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

genai/tools/tools_func_def_with_txt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def get_current_weather(location: str) -> str:
3434
return weather_map.get(location, "unknown")
3535

3636
client = genai.Client(http_options=HttpOptions(api_version="v1"))
37-
model_id = "gemini-2.5-flash-preview-05-20"
37+
model_id = "gemini-2.0-flash-001"
3838

3939
response = client.models.generate_content(
4040
model=model_id,

genai/tools/tools_func_desc_with_txt.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def generate_content() -> str:
2424
)
2525

2626
client = genai.Client(http_options=HttpOptions(api_version="v1"))
27-
model_id = "gemini-2.5-flash-preview-05-20"
27+
model_id = "gemini-2.0-flash-001"
2828

2929
get_album_sales = FunctionDeclaration(
3030
name="get_album_sales",
@@ -73,7 +73,7 @@ def generate_content() -> str:
7373
),
7474
)
7575

76-
print(response.function_calls[0])
76+
print(response.function_calls)
7777
# Example response:
7878
# [FunctionCall(
7979
# id=None,

genai/tools/tools_vais_with_txt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def generate_content(datastore: str) -> str:
3030
# datastore = "projects/111111111111/locations/global/collections/default_collection/dataStores/data-store-id"
3131

3232
response = client.models.generate_content(
33-
model="gemini-2.5-flash-preview-05-20",
33+
model="gemini-2.0-flash-001",
3434
contents="How do I make an appointment to renew my driver's license?",
3535
config=GenerateContentConfig(
3636
tools=[

0 commit comments

Comments
 (0)