Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,11 @@ repos:
exclude: (?i)SKILL\.md$
additional_dependencies:
- mdformat-gfm
- repo: https://github.com/codespell-project/codespell
rev: v2.4.2
hooks:
- id: codespell
# Configuration (skip globs, ignored words) lives in the
# [tool.codespell] table in pyproject.toml.
additional_dependencies:
- tomli
2 changes: 1 addition & 1 deletion contributing/samples/integrations/data_agent/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
CREDENTIALS_TYPE = None

if CREDENTIALS_TYPE == AuthCredentialTypes.OAUTH2:
# Initiaze the tools to do interactive OAuth
# Initialize the tools to do interactive OAuth
# The environment variables OAUTH_CLIENT_ID and OAUTH_CLIENT_SECRET
# must be set
credentials_config = DataAgentCredentialsConfig(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
SCOPES = ["https://www.googleapis.com/auth/calendar"]

calendar_toolset = CalendarToolset(
# you can also replace below customized `list_calendar_events` with build-in
# you can also replace below customized `list_calendar_events` with built-in
# google calendar tool by adding `calendar_events_list` in the filter list
client_id=oauth_client_id,
client_secret=oauth_client_secret,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ There are a few options to perform similarity search:
"from the Spanner database."
),
instruction="""
You are a helpful assistant that answers user questions to find the most relavant information from a Spanner database.
You are a helpful assistant that answers user questions to find the most relevant information from a Spanner database.
1. Always use the `similarity_search` tool to find relevant information.
2. If no relevant information is found, say you don't know.
3. Present all the relevant information naturally and well formatted in your response.
Expand Down
2 changes: 1 addition & 1 deletion contributing/samples/workflows/route/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def route_on_category(category: InputCategory):

def handle_other():
yield Event(
message="Sorry I can only anwer questions or comment on statements."
message="Sorry I can only answer questions or comment on statements."
)


Expand Down
11 changes: 11 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,17 @@ line_length = 200
single_line_exclusions = []
known_third_party = [ "a2a", "google.adk" ]

[tool.codespell]
# Real words/identifiers that codespell misreads as typos:
# hel/serie/strin -> substrings in test fixtures; te -> local variable;
# rouge -> the ROUGE metric; unparseable -> valid spelling variant;
# re-use/re-used -> intentional hyphenation.
ignore-words-list = "hel,serie,strin,te,rouge,unparseable,re-use,re-used"
# CHANGELOG.md is generated from commit messages; lockfiles, notebooks, JSON
# fixtures, bundled JS/source maps, and the vendored CLI browser bundle are
# generated or data files, not prose we own.
skip = "*CHANGELOG.md,*.lock,*.ipynb,*.json,*.js,*.map,*/cli/browser/*"

[tool.mypy]
mypy_path = [ "src" ]
exclude = [ "contributing/samples/", "tests/" ]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class RubricBasedToolUseV1Evaluator(RubricBasedEvaluator):
"""An Evaluator for rubric based assessment of the agent's usage of Tools.

Example: Lets take an example of a Weather Agent that has access to two tools:
1: GeoCoding Tool: Coverts a city name, address or zip code into geographic
1: GeoCoding Tool: Converts a city name, address or zip code into geographic
coordinates.
2: GetWeather Tool: Gets weather for the next 10 days for the given geographic
coordinates.
Expand Down
2 changes: 1 addition & 1 deletion src/google/adk/runners.py
Original file line number Diff line number Diff line change
Expand Up @@ -1631,7 +1631,7 @@ async def run_live(
* **Other Control Events:** Most control events are saved.

**Events Saved to the Session:**
* **Live Model Audio Events with File Data:** Both input and ouput audio
* **Live Model Audio Events with File Data:** Both input and output audio
data are aggregated into an audio file saved into artifacts. The
reference to the file is saved as event in the `file_data` to session
if RunConfig.save_live_model_audio_to_session is True.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def get_connector_base_spec() -> Dict[str, Any]:
"host": {
"type": "string",
"default": "",
"description": "Host name incase of tls service directory",
"description": "Host name in case of tls service directory",
},
"entity": {
"type": "string",
Expand Down
2 changes: 1 addition & 1 deletion src/google/adk/workflow/_function_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ def model_copy(
# If the wrapped function is a bound method of a Node, we need to clone
# the Node and re-bind the function to the new instance.
# This is needed if the function is referring to params like 'name' from the "self" reference.
# Like Workflow or LLM use that name for event node_paths or retreving session events.
# Like Workflow or LLM use that name for event node_paths or retrieving session events.
func = self._func
if inspect.ismethod(func) and isinstance(
getattr(func, '__self__', None), BaseNode
Expand Down
2 changes: 1 addition & 1 deletion tests/unittests/a2a/executor/test_a2a_agent_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1154,7 +1154,7 @@ async def mock_run_async(**kwargs):
)
self.mock_runner._new_invocation_context.return_value = Mock()

# We patch TaskResultAggregator just to avoid other errors and simplfy
# We patch TaskResultAggregator just to avoid other errors and simplify
with patch(
"google.adk.a2a.executor.a2a_agent_executor.TaskResultAggregator"
) as mock_agg_class:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2183,7 +2183,7 @@ def test_tool_call_doesnt_change_global_settings(tool_call):
# Call the tool
result = tool_call(settings, tool_context)

# Test successfull executeion of the tool
# Test successful executeion of the tool
assert result == {"status": "SUCCESS", "rows": []}

# Test settings write mode after
Expand Down
Loading