Skip to content

Commit 5cda37a

Browse files
ammmrcopybara-github
authored andcommitted
chore: fix typos in multiple files
Merge #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=#2864 from ammmr:chore-fix-typos 3cea9fc PiperOrigin-RevId: 805227784
1 parent 3e6d91f commit 5cda37a

File tree

8 files changed

+12
-12
lines changed

8 files changed

+12
-12
lines changed

contributing/samples/adk_answering_agent/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def convert_gcs_to_https(gcs_uri: str) -> Optional[str]:
127127
# Use the directory path if it is a index file
128128
final_path_segment = os.path.dirname(path_after_docs)
129129
else:
130-
# Otherwise, use the file name without extention
130+
# Otherwise, use the file name without extension
131131
final_path_segment = path_after_docs.removesuffix(".md")
132132

133133
if final_path_segment and not final_path_segment.endswith("/"):

llms-full.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15168,7 +15168,7 @@ Agent client received an event with long running function calls and check the st
1516815168
return part.function_call
1516915169

1517015170
def get_function_response(event: Event, function_call_id: str) -> types.FunctionResponse:
15171-
# Get the function response for the fuction call with specified id.
15171+
# Get the function response for the function call with specified id.
1517215172
if not event.content or not event.content.parts:
1517315173
return
1517415174
for part in event.content.parts:

src/google/adk/a2a/converters/part_converter.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,11 @@ def convert_a2a_part_to_genai_part(
9393
return None
9494

9595
if isinstance(part, a2a_types.DataPart):
96-
# Conver the Data Part to funcall and function reponse.
96+
# Convert the Data Part to funcall and function response.
9797
# This is mainly for converting human in the loop and auth request and
9898
# response.
99-
# TODO once A2A defined how to suervice such information, migrate below
100-
# logic accordinlgy
99+
# TODO once A2A defined how to service such information, migrate below
100+
# logic accordingly
101101
if (
102102
part.metadata
103103
and _get_adk_metadata_key(A2A_DATA_PART_METADATA_TYPE_KEY)
@@ -188,11 +188,11 @@ def convert_genai_part_to_a2a_part(
188188

189189
return a2a_types.Part(root=a2a_part)
190190

191-
# Conver the funcall and function reponse to A2A DataPart.
191+
# Convert the funcall and function response to A2A DataPart.
192192
# This is mainly for converting human in the loop and auth request and
193193
# response.
194194
# TODO once A2A defined how to suervice such information, migrate below
195-
# logic accordinlgy
195+
# logic accordingly
196196
if part.function_call:
197197
return a2a_types.Part(
198198
root=a2a_types.DataPart(

src/google/adk/agents/base_agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ def _parse_config(
565565
) -> Dict[str, Any]:
566566
"""Parses the config and returns updated kwargs to construct the agent.
567567
568-
Sub-classes should override this method to use a custome agent config class.
568+
Sub-classes should override this method to use a custom agent config class.
569569
570570
Args:
571571
config: The config to parse.

src/google/adk/evaluation/agent_evaluator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ async def _get_eval_results_by_eval_id(
569569
def _get_eval_metric_results_with_invocation(
570570
eval_results_per_eval_id: list[EvalCaseResult],
571571
) -> dict[str, list[_EvalMetricResultWithInvocation]]:
572-
"""Retruns _EvalMetricResultWithInvocation grouped by metric.
572+
"""Returns _EvalMetricResultWithInvocation grouped by metric.
573573
574574
EvalCaseResult contain results for each metric per invocation.
575575

src/google/adk/flows/llm_flows/basic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ async def run_async(
5252
)
5353
# Only set output_schema if no tools are specified. as of now, model don't
5454
# support output_schema and tools together. we have a workaround to support
55-
# both outoput_schema and tools at the same time. see
55+
# both output_schema and tools at the same time. see
5656
# _output_schema_processor.py for details
5757
if agent.output_schema and not agent.tools:
5858
llm_request.set_output_schema(agent.output_schema)

src/google/adk/flows/llm_flows/contents.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def _rearrange_events_for_latest_function_response(
133133

134134
function_responses = events[-1].get_function_responses()
135135
if not function_responses:
136-
# No need to process, since the latest event is not fuction_response.
136+
# No need to process, since the latest event is not function_response.
137137
return events
138138

139139
function_responses_ids = set()

src/google/adk/models/google_llm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ async def generate_content_async(
135135
config=llm_request.config,
136136
)
137137

138-
# for sse, similar as bidi (see receive method in gemini_llm_connecton.py),
138+
# for sse, similar as bidi (see receive method in gemini_llm_connection.py),
139139
# we need to mark those text content as partial and after all partial
140140
# contents are sent, we send an accumulated event which contains all the
141141
# previous partial content. The only difference is bidi rely on

0 commit comments

Comments
 (0)