Skip to content

Commit d337ddf

Browse files
wuliang229copybara-github
authored andcommitted
chore: Update Live sample agents' models
Co-authored-by: Liang Wu <wuliang@google.com> PiperOrigin-RevId: 899943556
1 parent 454188d commit d337ddf

File tree

5 files changed

+28
-30
lines changed
  • contributing/samples

5 files changed

+28
-30
lines changed

contributing/samples/live_bidi_streaming_multi_agent/agent.py

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,10 @@ def roll_die(sides: int) -> int:
3030
roll_agent = Agent(
3131
name="roll_agent",
3232
model=Gemini(
33-
# see https://docs.cloud.google.com/vertex-ai/generative-ai/docs/migrate
34-
# for vertex model names
35-
model="gemini-live-2.5-flash-native-audio", # vertex
36-
# see https://ai.google.dev/gemini-api/docs/models for AIS model names
37-
# model='gemini-2.5-flash-native-audio-latest', # for AI studio
33+
# Find supported models in Vertex here: https://docs.cloud.google.com/vertex-ai/generative-ai/docs/live-api
34+
model="gemini-live-2.5-flash-native-audio", # Vertex
35+
# Find supported models in Gemini API here: https://ai.google.dev/gemini-api/docs/models
36+
# model='gemini-2.5-flash-native-audio-preview-12-2025', # Gemini API
3837
speech_config=types.SpeechConfig(
3938
voice_config=types.VoiceConfig(
4039
prebuilt_voice_config=types.PrebuiltVoiceConfig(
@@ -85,11 +84,10 @@ def check_prime(nums: list[int]) -> str:
8584
prime_agent = Agent(
8685
name="prime_agent",
8786
model=Gemini(
88-
# see https://docs.cloud.google.com/vertex-ai/generative-ai/docs/migrate
89-
# for vertex model names
90-
model="gemini-live-2.5-flash-native-audio", # vertex
91-
# see https://ai.google.dev/gemini-api/docs/models for AIS model names
92-
# model='gemini-2.5-flash-native-audio-latest', # for AI studio
87+
# Find supported models in Vertex here: https://docs.cloud.google.com/vertex-ai/generative-ai/docs/live-api
88+
model="gemini-live-2.5-flash-native-audio", # Vertex
89+
# Find supported models in Gemini API here: https://ai.google.dev/gemini-api/docs/models
90+
# model='gemini-2.5-flash-native-audio-preview-12-2025', # Gemini API
9391
speech_config=types.SpeechConfig(
9492
voice_config=types.VoiceConfig(
9593
prebuilt_voice_config=types.PrebuiltVoiceConfig(
@@ -128,13 +126,11 @@ def get_current_weather(location: str):
128126

129127

130128
root_agent = Agent(
131-
# find supported models here: https://google.github.io/adk-docs/get-started/streaming/quickstart-streaming/
132129
model=Gemini(
133-
# see https://docs.cloud.google.com/vertex-ai/generative-ai/docs/migrate
134-
# for vertex model names
135-
model="gemini-live-2.5-flash-native-audio", # vertex
136-
# see https://ai.google.dev/gemini-api/docs/models for AIS model names
137-
# model='gemini-2.5-flash-native-audio-latest', # for AI studio
130+
# Find supported models in Vertex here: https://docs.cloud.google.com/vertex-ai/generative-ai/docs/live-api
131+
model="gemini-live-2.5-flash-native-audio", # Vertex
132+
# Find supported models in Gemini API here: https://ai.google.dev/gemini-api/docs/models
133+
# model='gemini-2.5-flash-native-audio-preview-12-2025', # Gemini API
138134
speech_config=types.SpeechConfig(
139135
voice_config=types.VoiceConfig(
140136
prebuilt_voice_config=types.PrebuiltVoiceConfig(

contributing/samples/live_bidi_streaming_parallel_tools_agent/agent.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ def turn_on_tv():
2929

3030

3131
root_agent = Agent(
32-
model="gemini-live-2.5-flash-native-audio",
32+
# Find supported models in Vertex here: https://docs.cloud.google.com/vertex-ai/generative-ai/docs/live-api
33+
model="gemini-live-2.5-flash-native-audio", # Vertex
34+
# Find supported models in Gemini API here: https://ai.google.dev/gemini-api/docs/models
35+
# model='gemini-2.5-flash-native-audio-preview-12-2025', # Gemini API
3336
name="Home_helper",
3437
instruction="Be polite and answer all user's questions.",
3538
tools=[turn_on_lights, turn_on_tv],

contributing/samples/live_bidi_streaming_single_agent/agent.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,10 @@ async def check_prime(nums: list[int]) -> str:
6565

6666

6767
root_agent = Agent(
68-
# see https://docs.cloud.google.com/vertex-ai/generative-ai/docs/migrate
69-
# for vertex model names
70-
model='gemini-live-2.5-flash-native-audio', # vertex
71-
# see https://ai.google.dev/gemini-api/docs/models for AIS model names
72-
# model='gemini-2.5-flash-native-audio-latest', # for AI studio
68+
# Find supported models in Vertex here: https://docs.cloud.google.com/vertex-ai/generative-ai/docs/live-api
69+
model='gemini-live-2.5-flash-native-audio', # Vertex
70+
# Find supported models in Gemini API here: https://ai.google.dev/gemini-api/docs/models
71+
# model='gemini-2.5-flash-native-audio-preview-12-2025', # Gemini API
7372
name='roll_dice_agent',
7473
description=(
7574
'hello world agent that can roll a dice of 6 sides and check prime'

contributing/samples/live_bidi_streaming_tools_agent/agent.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,10 @@ def stop_streaming(function_name: str):
124124

125125

126126
root_agent = Agent(
127-
# see https://docs.cloud.google.com/vertex-ai/generative-ai/docs/migrate
128-
# for vertex model names
129-
model="gemini-live-2.5-flash-native-audio", # vertex
130-
# see https://ai.google.dev/gemini-api/docs/models for AIS model names
131-
# model='gemini-2.5-flash-native-audio-latest', # for AI studio
127+
# Find supported models in Vertex here: https://docs.cloud.google.com/vertex-ai/generative-ai/docs/live-api
128+
model="gemini-live-2.5-flash-native-audio", # Vertex
129+
# Find supported models in Gemini API here: https://ai.google.dev/gemini-api/docs/models
130+
# model='gemini-2.5-flash-native-audio-preview-12-2025', # Gemini API
132131
name="video_streaming_agent",
133132
instruction="""
134133
You are a monitoring agent. You can do video monitoring and stock price monitoring

contributing/samples/live_tool_callbacks_agent/agent.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,9 +217,10 @@ async def after_tool_async_callback(
217217

218218
# Create the agent with tool callbacks
219219
root_agent = Agent(
220-
# find supported models here: https://google.github.io/adk-docs/get-started/streaming/quickstart-streaming/
221-
model="gemini-2.0-flash-live-preview-04-09", # for Vertex project
222-
# model="gemini-live-2.5-flash-preview", # for AI studio key
220+
# Find supported models in Vertex here: https://docs.cloud.google.com/vertex-ai/generative-ai/docs/live-api
221+
model="gemini-live-2.5-flash-native-audio", # Vertex
222+
# Find supported models in Gemini API here: https://ai.google.dev/gemini-api/docs/models
223+
# model='gemini-2.5-flash-native-audio-preview-12-2025', # Gemini API
223224
name="tool_callbacks_agent",
224225
description=(
225226
"Live streaming agent that demonstrates tool callbacks functionality. "

0 commit comments

Comments
 (0)