diff --git a/examples/google_adk/birthday_planner/__main__.py b/examples/google_adk/birthday_planner/__main__.py index 16609b3e..02005e92 100644 --- a/examples/google_adk/birthday_planner/__main__.py +++ b/examples/google_adk/birthday_planner/__main__.py @@ -6,7 +6,7 @@ import click import uvicorn -from adk_agent_executor import ADKAgentExecutor +from adk_agent_executor import ADKAgentExecutor # type: ignore[import-untyped] from dotenv import load_dotenv from a2a.server.apps import A2AStarletteApplication diff --git a/examples/google_adk/calendar_agent/__main__.py b/examples/google_adk/calendar_agent/__main__.py index 823a14aa..82bc2044 100644 --- a/examples/google_adk/calendar_agent/__main__.py +++ b/examples/google_adk/calendar_agent/__main__.py @@ -4,13 +4,13 @@ import click import uvicorn -from adk_agent import create_agent -from adk_agent_executor import ADKAgentExecutor +from adk_agent import create_agent # type: ignore[import-not-found] +from adk_agent_executor import ADKAgentExecutor # type: ignore[import-untyped] from dotenv import load_dotenv -from google.adk.artifacts import InMemoryArtifactService -from google.adk.memory.in_memory_memory_service import InMemoryMemoryService -from google.adk.runners import Runner -from google.adk.sessions import InMemorySessionService +from google.adk.artifacts import InMemoryArtifactService # type: ignore[import-untyped] +from google.adk.memory.in_memory_memory_service import InMemoryMemoryService # type: ignore[import-untyped] +from google.adk.runners import Runner # type: ignore[import-untyped] +from google.adk.sessions import InMemorySessionService # type: ignore[import-untyped] from starlette.applications import Starlette from starlette.requests import Request from starlette.responses import PlainTextResponse @@ -81,7 +81,7 @@ def main(host: str, port: int): async def handle_auth(request: Request) -> PlainTextResponse: await agent_executor.on_auth_callback( - request.query_params.get('state'), str(request.url) + str(request.query_params.get('state')), str(request.url) ) return PlainTextResponse('Authentication successful.') diff --git a/examples/google_adk/calendar_agent/adk_agent.py b/examples/google_adk/calendar_agent/adk_agent.py index 4c8cdfe3..90da3f1f 100644 --- a/examples/google_adk/calendar_agent/adk_agent.py +++ b/examples/google_adk/calendar_agent/adk_agent.py @@ -1,7 +1,7 @@ import datetime -from google.adk.agents import LlmAgent -from google.adk.tools.google_api_tool import calendar_tool_set +from google.adk.agents import LlmAgent # type: ignore[import-untyped] +from google.adk.tools.google_api_tool import calendar_tool_set # type: ignore[import-untyped] def create_agent(client_id, client_secret) -> LlmAgent: diff --git a/examples/helloworld/__main__.py b/examples/helloworld/__main__.py index ba06207b..cc386ebd 100644 --- a/examples/helloworld/__main__.py +++ b/examples/helloworld/__main__.py @@ -1,4 +1,4 @@ -from agent_executor import HelloWorldAgentExecutor +from agent_executor import HelloWorldAgentExecutor # type: ignore[import-untyped] from a2a.server.apps import A2AStarletteApplication from a2a.server.request_handlers import DefaultRequestHandler diff --git a/examples/langgraph/__main__.py b/examples/langgraph/__main__.py index 6f151ed3..783bd8e3 100644 --- a/examples/langgraph/__main__.py +++ b/examples/langgraph/__main__.py @@ -4,8 +4,8 @@ import click import httpx -from agent import CurrencyAgent -from agent_executor import CurrencyAgentExecutor +from agent import CurrencyAgent # type: ignore[import-untyped] +from agent_executor import CurrencyAgentExecutor # type: ignore[import-untyped] from dotenv import load_dotenv from a2a.server.apps import A2AStarletteApplication diff --git a/examples/langgraph/agent_executor.py b/examples/langgraph/agent_executor.py index 5e2ed77a..add3c045 100644 --- a/examples/langgraph/agent_executor.py +++ b/examples/langgraph/agent_executor.py @@ -1,6 +1,5 @@ -from agent import CurrencyAgent +from agent import CurrencyAgent # type: ignore[import-untyped] from typing_extensions import override - from a2a.server.agent_execution import AgentExecutor, RequestContext from a2a.server.events.event_queue import EventQueue from a2a.types import ( diff --git a/examples/langgraph/test_client.py b/examples/langgraph/test_client.py index 01d925ae..1eb2664a 100644 --- a/examples/langgraph/test_client.py +++ b/examples/langgraph/test_client.py @@ -71,8 +71,7 @@ async def run_single_turn_test(client: A2AClient) -> None: task_id: str = send_response.root.result.id print('---Query Task---') # query the task - task_id_payload = {'id': task_id} - get_request = GetTaskRequest(params=TaskQueryParams(**task_id_payload)) + get_request = GetTaskRequest(params=TaskQueryParams(id=task_id)) get_response: GetTaskResponse = await client.get_task(get_request) print_json_response(get_response, 'Query Task Response')