You've already forked adk-python
mirror of
https://github.com/encounter/adk-python.git
synced 2026-03-30 10:57:20 -07:00
chore: fix typos in multiple files
Merge https://github.com/google/adk-python/pull/2864 **Reason for this change:** Multiple typos were found in comments, docstrings, and code throughout the codebase, which could lead to confusion and reduce code readability. **Changes made:** Fixed the following typos across 8 files: 1. contributing/samples/adk_answering_agent/utils.py:130: "extention" → "extension" 2. llms-full.txt:15171: "fuction" → "function" 3. src/google/adk/a2a/converters/part_converter.py: - Line 96: "Conver" → "Convert", "reponse" → "response" - Line 99: "suervice" → "service" - Line 100: "accordinlgy" → "accordingly" - Line 191: "Conver" → "Convert", "reponse" → "response" - Line 195: "accordinlgy" → "accordingly" 4. src/google/adk/agents/base_agent.py:568: "custome" → "custom" 5. src/google/adk/evaluation/agent_evaluator.py:572: "Retruns" → "Returns" 6. src/google/adk/flows/llm_flows/basic.py:55: "outoput_schema" → "output_schema" 7. src/google/adk/flows/llm_flows/contents.py:136: "fuction_response" → "function_response" 8. src/google/adk/models/google_llm.py:138: "gemini_llm_connecton.py" → "gemini_llm_connection.py" **Impact:** This change will: - Improve code documentation clarity and professionalism - Make comments, docstrings, and code more readable and accurate - Help prevent confusion for developers reading the code - Ensure consistency in terminology throughout the codebase This is a non-breaking change that only affects comments, documentation strings, and improves code clarity. COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/2864 from ammmr:chore-fix-typos 3cea9fcf6f21edb006b63e9258d2b82930dd961d PiperOrigin-RevId: 805227784
This commit is contained in:
committed by
Copybara-Service
parent
3e6d91f9e2
commit
5cda37adb3
@@ -127,7 +127,7 @@ def convert_gcs_to_https(gcs_uri: str) -> Optional[str]:
|
||||
# Use the directory path if it is a index file
|
||||
final_path_segment = os.path.dirname(path_after_docs)
|
||||
else:
|
||||
# Otherwise, use the file name without extention
|
||||
# Otherwise, use the file name without extension
|
||||
final_path_segment = path_after_docs.removesuffix(".md")
|
||||
|
||||
if final_path_segment and not final_path_segment.endswith("/"):
|
||||
|
||||
+1
-1
@@ -15168,7 +15168,7 @@ Agent client received an event with long running function calls and check the st
|
||||
return part.function_call
|
||||
|
||||
def get_function_response(event: Event, function_call_id: str) -> types.FunctionResponse:
|
||||
# Get the function response for the fuction call with specified id.
|
||||
# Get the function response for the function call with specified id.
|
||||
if not event.content or not event.content.parts:
|
||||
return
|
||||
for part in event.content.parts:
|
||||
|
||||
@@ -93,11 +93,11 @@ def convert_a2a_part_to_genai_part(
|
||||
return None
|
||||
|
||||
if isinstance(part, a2a_types.DataPart):
|
||||
# Conver the Data Part to funcall and function reponse.
|
||||
# Convert the Data Part to funcall and function response.
|
||||
# This is mainly for converting human in the loop and auth request and
|
||||
# response.
|
||||
# TODO once A2A defined how to suervice such information, migrate below
|
||||
# logic accordinlgy
|
||||
# TODO once A2A defined how to service such information, migrate below
|
||||
# logic accordingly
|
||||
if (
|
||||
part.metadata
|
||||
and _get_adk_metadata_key(A2A_DATA_PART_METADATA_TYPE_KEY)
|
||||
@@ -188,11 +188,11 @@ def convert_genai_part_to_a2a_part(
|
||||
|
||||
return a2a_types.Part(root=a2a_part)
|
||||
|
||||
# Conver the funcall and function reponse to A2A DataPart.
|
||||
# Convert the funcall and function response to A2A DataPart.
|
||||
# This is mainly for converting human in the loop and auth request and
|
||||
# response.
|
||||
# TODO once A2A defined how to suervice such information, migrate below
|
||||
# logic accordinlgy
|
||||
# logic accordingly
|
||||
if part.function_call:
|
||||
return a2a_types.Part(
|
||||
root=a2a_types.DataPart(
|
||||
|
||||
@@ -565,7 +565,7 @@ class BaseAgent(BaseModel):
|
||||
) -> Dict[str, Any]:
|
||||
"""Parses the config and returns updated kwargs to construct the agent.
|
||||
|
||||
Sub-classes should override this method to use a custome agent config class.
|
||||
Sub-classes should override this method to use a custom agent config class.
|
||||
|
||||
Args:
|
||||
config: The config to parse.
|
||||
|
||||
@@ -569,7 +569,7 @@ class AgentEvaluator:
|
||||
def _get_eval_metric_results_with_invocation(
|
||||
eval_results_per_eval_id: list[EvalCaseResult],
|
||||
) -> dict[str, list[_EvalMetricResultWithInvocation]]:
|
||||
"""Retruns _EvalMetricResultWithInvocation grouped by metric.
|
||||
"""Returns _EvalMetricResultWithInvocation grouped by metric.
|
||||
|
||||
EvalCaseResult contain results for each metric per invocation.
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ class _BasicLlmRequestProcessor(BaseLlmRequestProcessor):
|
||||
)
|
||||
# Only set output_schema if no tools are specified. as of now, model don't
|
||||
# support output_schema and tools together. we have a workaround to support
|
||||
# both outoput_schema and tools at the same time. see
|
||||
# both output_schema and tools at the same time. see
|
||||
# _output_schema_processor.py for details
|
||||
if agent.output_schema and not agent.tools:
|
||||
llm_request.set_output_schema(agent.output_schema)
|
||||
|
||||
@@ -133,7 +133,7 @@ def _rearrange_events_for_latest_function_response(
|
||||
|
||||
function_responses = events[-1].get_function_responses()
|
||||
if not function_responses:
|
||||
# No need to process, since the latest event is not fuction_response.
|
||||
# No need to process, since the latest event is not function_response.
|
||||
return events
|
||||
|
||||
function_responses_ids = set()
|
||||
|
||||
@@ -135,7 +135,7 @@ class Gemini(BaseLlm):
|
||||
config=llm_request.config,
|
||||
)
|
||||
|
||||
# for sse, similar as bidi (see receive method in gemini_llm_connecton.py),
|
||||
# for sse, similar as bidi (see receive method in gemini_llm_connection.py),
|
||||
# we need to mark those text content as partial and after all partial
|
||||
# contents are sent, we send an accumulated event which contains all the
|
||||
# previous partial content. The only difference is bidi rely on
|
||||
|
||||
Reference in New Issue
Block a user