Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ def route_weekend(weekend_budget: WeekendBudget):
if amount < 5:
yield Event(route="too_low")
elif amount < 100:
yield Event(route="cheap_ideas")
yield Event(route="value_ideas")
else:
yield Event(route="fancy_ideas")
yield Event(route="premium_ideas")


def handle_too_low():
Expand Down
18 changes: 16 additions & 2 deletions examples/python/snippets/tools/auth/tools_and_agent.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import os

from google.adk.auth.auth_schemes import OpenIdConnectWithConfig
Expand Down Expand Up @@ -33,7 +47,7 @@
auth_type=AuthCredentialTypes.OPEN_ID_CONNECT,
oauth2=OAuth2Auth(
client_id="CLIENT_ID",
client_secret="CIENT_SECRET",
client_secret="CLIENT_SECRET",
)
)

Expand Down Expand Up @@ -61,7 +75,7 @@
model='gemini-2.0-flash',
name='enterprise_assistant',
instruction='Help user integrate with multiple enterprise systems, including retrieving user information which may require authentication.',
tools=userinfo_toolset.get_tools(),
tools=[userinfo_toolset],
)

# --- Ready for Use ---
Expand Down