File tree Expand file tree Collapse file tree
contributing/samples/core/quickstart Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -58,10 +58,15 @@ The release cadence is roughly bi-weekly.
5858
5959``` python
6060from google.adk import Agent
61+ from google.adk.models import Gemini
62+ from google.genai import types
6163
6264root_agent = Agent(
6365 name = " greeting_agent" ,
64- model = " gemini-2.5-flash" ,
66+ model = Gemini(
67+ model = " gemini-2.5-flash" ,
68+ retry_options = types.HttpRetryOptions(initial_delay = 1 , attempts = 3 ),
69+ ),
6570 instruction = " You are a helpful assistant. Greet the user warmly." ,
6671)
6772```
Original file line number Diff line number Diff line change 1313# limitations under the License.
1414
1515from google .adk .agents .llm_agent import Agent
16+ from google .adk .models import Gemini
17+ from google .genai import types
1618
1719
1820def get_weather (city : str ) -> dict :
@@ -80,6 +82,10 @@ def get_current_time(city: str) -> dict:
8082
8183root_agent = Agent (
8284 name = "weather_time_agent" ,
85+ model = Gemini (
86+ model = "gemini-2.5-flash" ,
87+ retry_options = types .HttpRetryOptions (initial_delay = 1 , attempts = 3 ),
88+ ),
8389 description = (
8490 "Agent to answer questions about the time and weather in a city."
8591 ),
You can’t perform that action at this time.
0 commit comments