Skip to content

Commit 87dcaaf

Browse files
committed
Address feedback comments
1 parent e8ee448 commit 87dcaaf

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

samples/adk-sql-agent/main.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,6 @@
5151
# Set web=True if you intend to serve a web interface, False otherwise
5252
SERVE_WEB_INTERFACE = True
5353

54-
logging.getLogger("opentelemetry").setLevel(logging.DEBUG)
55-
56-
5754
# [START opentelemetry_adk_otel_setup]
5855
def setup_opentelemetry() -> None:
5956
credentials, project_id = google.auth.default()
@@ -121,7 +118,7 @@ def main() -> None:
121118
# For this example this would be the current directory containing main.py.
122119
# Note: Calling this method attempts to set the global tracer provider, which has already been
123120
# set by the setup_opentelemetry() function.
124-
app: FastAPI = get_fast_api_app(
121+
app = get_fast_api_app(
125122
agents_dir=AGENT_DIR,
126123
session_service_uri=SESSION_DB_URL,
127124
allow_origins=ALLOWED_ORIGINS,

samples/adk-sql-agent/sql_agent/agent.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@
4040
You should always check if database for current session exist before running sql queries by calling create_database_tool.
4141
If you make a mistake, try to recover."""
4242

43-
INTRO_TEXT = """\
44-
Starting agent using ephemeral SQLite DB {dbpath}. This demo allows you to chat with an Agent
43+
DESCRIPTION = """\
44+
Starting agent using ephemeral SQLite DB. This demo allows you to chat with an Agent
4545
that has full access to an ephemeral SQLite database. The database is initially empty. It is
4646
built with the the LangGraph prebuilt **ReAct Agent** and the **SQLDatabaseToolkit**. Here are some samples you can try:
4747
@@ -64,7 +64,7 @@
6464
root_agent = Agent(
6565
name="weather_time_agent",
6666
model="gemini-2.0-flash",
67-
description=INTRO_TEXT,
67+
description=DESCRIPTION,
6868
instruction=SYSTEM_PROMPT,
6969
tools=[run_sql_tool, create_database_tool],
7070
)

samples/adk-sql-agent/sql_agent/tools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def create_database_tool(tool_context: ToolContext):
4242
_, path = tempfile.mkstemp(suffix=".db")
4343
# No scope prefix in the state data indicates that it will be persisted for
4444
# current session.
45-
# See https://deepwiki.com/google/adk-python/3.4-state-management.
45+
# See https://google.github.io/adk-docs/sessions/state/.
4646
tool_context.state[SESSION_DB_KEY] = path
4747

4848
@tracer.start_as_current_span("run_sql")

0 commit comments

Comments
 (0)