From ee2a75368a437480813d3a1a4c66363e3488a30a Mon Sep 17 00:00:00 2001 From: Fangyu Date: Fri, 11 Apr 2025 22:19:57 -0700 Subject: [PATCH] Fix typos in docstrings across multiple files (#101) * Fix typos in docstrings across multiple files: 'conversaction' -> 'conversation' and 'dsiabled' -> 'disabled'. Update comments for clarity. * Fix typos in comments and docstrings across multiple files - Corrected "reqeust" to "request" in auth_preprocessor.py - Fixed "credentails" to "credentials" in auth_tool.py - Updated "agetn" to "agent" in cli_eval.py - Changed "creiteria" to "criteria" in cli_tools_click.py --------- Co-authored-by: fangyu Co-authored-by: Hangfei Lin --- src/google/adk/agents/base_agent.py | 8 ++++---- src/google/adk/agents/invocation_context.py | 2 +- src/google/adk/agents/remote_agent.py | 2 +- src/google/adk/agents/run_config.py | 2 +- src/google/adk/auth/auth_preprocessor.py | 4 ++-- src/google/adk/auth/auth_tool.py | 2 +- src/google/adk/cli/cli_eval.py | 4 ++-- src/google/adk/cli/cli_tools_click.py | 2 +- src/google/adk/telemetry.py | 4 ++-- 9 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/google/adk/agents/base_agent.py b/src/google/adk/agents/base_agent.py index c47d9e3..ece60fb 100644 --- a/src/google/adk/agents/base_agent.py +++ b/src/google/adk/agents/base_agent.py @@ -120,7 +120,7 @@ class BaseAgent(BaseModel): self, parent_context: InvocationContext, ) -> AsyncGenerator[Event, None]: - """Entry method to run an agent via text-based conversaction. + """Entry method to run an agent via text-based conversation. Args: parent_context: InvocationContext, the invocation context of the parent @@ -152,7 +152,7 @@ class BaseAgent(BaseModel): self, parent_context: InvocationContext, ) -> AsyncGenerator[Event, None]: - """Entry method to run an agent via video/audio-based conversaction. + """Entry method to run an agent via video/audio-based conversation. Args: parent_context: InvocationContext, the invocation context of the parent @@ -171,7 +171,7 @@ class BaseAgent(BaseModel): async def _run_async_impl( self, ctx: InvocationContext ) -> AsyncGenerator[Event, None]: - """Core logic to run this agent via text-based conversaction. + """Core logic to run this agent via text-based conversation. Args: ctx: InvocationContext, the invocation context for this agent. @@ -187,7 +187,7 @@ class BaseAgent(BaseModel): async def _run_live_impl( self, ctx: InvocationContext ) -> AsyncGenerator[Event, None]: - """Core logic to run this agent via video/audio-based conversaction. + """Core logic to run this agent via video/audio-based conversation. Args: ctx: InvocationContext, the invocation context for this agent. diff --git a/src/google/adk/agents/invocation_context.py b/src/google/adk/agents/invocation_context.py index c02d62b..9acee44 100644 --- a/src/google/adk/agents/invocation_context.py +++ b/src/google/adk/agents/invocation_context.py @@ -124,7 +124,7 @@ class InvocationContext(BaseModel): agent_2, and agent_2 is the parent of agent_3. Branch is used when multiple sub-agents shouldn't see their peer agents' - conversaction history. + conversation history. """ agent: BaseAgent """The current agent of this invocation context. Readonly.""" diff --git a/src/google/adk/agents/remote_agent.py b/src/google/adk/agents/remote_agent.py index 2c5bc70..0c27e5a 100644 --- a/src/google/adk/agents/remote_agent.py +++ b/src/google/adk/agents/remote_agent.py @@ -32,7 +32,7 @@ class RemoteAgent(BaseAgent): sub_agents: list[BaseAgent] = Field( default_factory=list, init=False, frozen=True ) - """Sub-agent is dsiabled in RemoteAgent.""" + """Sub-agent is disabled in RemoteAgent.""" @override async def _run_async_impl( diff --git a/src/google/adk/agents/run_config.py b/src/google/adk/agents/run_config.py index 02e54af..17dff29 100644 --- a/src/google/adk/agents/run_config.py +++ b/src/google/adk/agents/run_config.py @@ -42,7 +42,7 @@ class RunConfig(BaseModel): """Speech configuration for the live agent.""" response_modalities: Optional[list[str]] = None - """The output modalities. If not set, its default to AUDIO.""" + """The output modalities. If not set, it's default to AUDIO.""" save_input_blobs_as_artifacts: bool = False """Whether or not to save the input blobs as artifacts.""" diff --git a/src/google/adk/auth/auth_preprocessor.py b/src/google/adk/auth/auth_preprocessor.py index 59a96d9..9a2f355 100644 --- a/src/google/adk/auth/auth_preprocessor.py +++ b/src/google/adk/auth/auth_preprocessor.py @@ -76,7 +76,7 @@ class _AuthLlmRequestProcessor(BaseLlmRequestProcessor): for i in range(len(events) - 2, -1, -1): event = events[i] - # looking for the system long running reqeust euc function call + # looking for the system long running request euc function call function_calls = event.get_function_calls() if not function_calls: continue @@ -92,7 +92,7 @@ class _AuthLlmRequestProcessor(BaseLlmRequestProcessor): if not tools_to_resume: continue - # found the the system long running reqeust euc function call + # found the the system long running request euc function call # looking for original function call that requests euc for j in range(i - 1, -1, -1): event = events[j] diff --git a/src/google/adk/auth/auth_tool.py b/src/google/adk/auth/auth_tool.py index bd3f845..91bdf68 100644 --- a/src/google/adk/auth/auth_tool.py +++ b/src/google/adk/auth/auth_tool.py @@ -19,7 +19,7 @@ from .auth_schemes import AuthScheme class AuthConfig(BaseModel): - """The auth config sent by tool asking client to collect auth credentails and + """The auth config sent by tool asking client to collect auth credentials and adk and client will help to fill in the response """ diff --git a/src/google/adk/cli/cli_eval.py b/src/google/adk/cli/cli_eval.py index 68fe9f7..6039acb 100644 --- a/src/google/adk/cli/cli_eval.py +++ b/src/google/adk/cli/cli_eval.py @@ -112,14 +112,14 @@ def get_evaluation_criteria_or_default( def get_root_agent(agent_module_file_path: str) -> Agent: - """Returns root agent given the agetn module.""" + """Returns root agent given the agent module.""" agent_module = _get_agent_module(agent_module_file_path) root_agent = agent_module.agent.root_agent return root_agent def try_get_reset_func(agent_module_file_path: str) -> Any: - """Returns reset function for the agent, if present, given the agetn module.""" + """Returns reset function for the agent, if present, given the agent module.""" agent_module = _get_agent_module(agent_module_file_path) reset_func = getattr(agent_module.agent, "reset_data", None) return reset_func diff --git a/src/google/adk/cli/cli_tools_click.py b/src/google/adk/cli/cli_tools_click.py index c22c93a..85e52ff 100644 --- a/src/google/adk/cli/cli_tools_click.py +++ b/src/google/adk/cli/cli_tools_click.py @@ -150,7 +150,7 @@ def cli_eval( EvalMetric(metric_name=metric_name, threshold=threshold) ) - print(f"Using evaluation creiteria: {evaluation_criteria}") + print(f"Using evaluation criteria: {evaluation_criteria}") root_agent = get_root_agent(agent_module_file_path) reset_func = try_get_reset_func(agent_module_file_path) diff --git a/src/google/adk/telemetry.py b/src/google/adk/telemetry.py index cef582f..0ee6cf8 100644 --- a/src/google/adk/telemetry.py +++ b/src/google/adk/telemetry.py @@ -16,8 +16,8 @@ # # We expect that the underlying GenAI SDK will provide a certain # level of tracing and logging telemetry aligned with Open Telemetry -# Semantic Conventions (such as logging prompts, respones, request -# properties, etc.) and so the information that is recorded by the +# Semantic Conventions (such as logging prompts, responses, +# request properties, etc.) and so the information that is recorded by the # Agent Development Kit should be focused on the higher-level # constructs of the framework that are not observable by the SDK.