Skip to content

Commit 6c217ba

Browse files
wuliang229copybara-github
authored andcommitted
chore: update models in samples/ folder to be gemini 2.0+
Gemini 1.5 is obsolete and not accessible to new projects. PiperOrigin-RevId: 795330977
1 parent c32cb6e commit 6c217ba

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

contributing/samples/hello_world_ma/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def check_prime(nums: list[int]) -> str:
131131

132132

133133
root_agent = Agent(
134-
model="gemini-1.5-flash",
134+
model="gemini-2.5-flash",
135135
name="root_agent",
136136
instruction="""
137137
You are a helpful assistant that can roll dice and check if numbers are prime.

contributing/samples/human_in_loop/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def ask_for_approval(
3939

4040

4141
root_agent = Agent(
42-
model='gemini-1.5-flash',
42+
model='gemini-2.5-flash',
4343
name='reimbursement_agent',
4444
instruction="""
4545
You are an agent whose job is to handle the reimbursement process for

contributing/samples/output_schema_with_tools/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def get_current_year() -> str:
8282
# Create the agent with both output_schema and tools
8383
root_agent = LlmAgent(
8484
name="person_info_agent",
85-
model="gemini-1.5-pro",
85+
model="gemini-2.5-pro",
8686
instruction="""
8787
You are a helpful assistant that gathers information about famous people.
8888

contributing/samples/workflow_agent_seq/agent.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
# Takes the initial specification (from user query) and writes code.
2424
code_writer_agent = LlmAgent(
2525
name="CodeWriterAgent",
26-
model="gemini-1.5-flash",
26+
model="gemini-2.5-flash",
2727
# Change 3: Improved instruction
2828
instruction="""You are a Python Code Generator.
2929
Based *only* on the user's request, write Python code that fulfills the requirement.
@@ -38,7 +38,7 @@
3838
# Takes the code generated by the previous agent (read from state) and provides feedback.
3939
code_reviewer_agent = LlmAgent(
4040
name="CodeReviewerAgent",
41-
model="gemini-2.0-flash",
41+
model="gemini-2.5-flash",
4242
# Change 3: Improved instruction, correctly using state key injection
4343
instruction="""You are an expert Python Code Reviewer.
4444
Your task is to provide constructive feedback on the provided code.
@@ -69,7 +69,7 @@
6969
# Takes the original code and the review comments (read from state) and refactors the code.
7070
code_refactorer_agent = LlmAgent(
7171
name="CodeRefactorerAgent",
72-
model="gemini-2.0-flash",
72+
model="gemini-2.5-flash",
7373
# Change 3: Improved instruction, correctly using state key injection
7474
instruction="""You are a Python Code Refactoring AI.
7575
Your goal is to improve the given Python code based on the provided review comments.

0 commit comments

Comments
 (0)