File tree Expand file tree Collapse file tree 1 file changed +0
-4
lines changed
samples/adk-sql-agent/sql_agent Expand file tree Collapse file tree 1 file changed +0
-4
lines changed Original file line number Diff line number Diff line change @@ -33,8 +33,6 @@ class SqlRunResult(TypedDict):
3333 rows : NotRequired [list [tuple [str , ...]]]
3434 """The rows returned by the SQL query"""
3535
36- # [START opentelemetry_adk_agent_span]
37- @tracer .start_as_current_span ("create_database" )
3836def create_database_tool (tool_context : ToolContext ) -> dict [str , Any ]:
3937 """Creates a temporary file in the /tmp directory to hold an ephemeral
4038 sqlite3 database if a database is not found for the current session.
@@ -47,9 +45,7 @@ def create_database_tool(tool_context: ToolContext) -> dict[str, Any]:
4745 tool_context .state [SESSION_DB_KEY ] = path
4846 return {"resp" : "Created an ephemeral database" }
4947 return {"resp" : f"Skipping database creation, { tool_context .state [SESSION_DB_KEY ]} already exists" }
50- # [END opentelemetry_adk_agent_span]
5148
52- @tracer .start_as_current_span ("run_sql" )
5349def run_sql_tool (sql_query : str , tool_context : ToolContext ) -> dict [str , Any ]:
5450 """Runs a SQLite query. The SQL query can be DDL or DML. Returns the rows if it's a SELECT query."""
5551 current_session_db_path = tool_context .state .get (SESSION_DB_KEY )
You can’t perform that action at this time.
0 commit comments