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
2 changes: 1 addition & 1 deletion contributing/samples/gepa/adk_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def _adk_agent(


class _UserAgent(base_agent.BaseAgent):
"""An agent that wraps the provided environment and simulates an user."""
"""An agent that wraps the provided environment and simulates a user."""

env: Env

Expand Down
2 changes: 1 addition & 1 deletion contributing/samples/gepa/tau_bench_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def solve(
max_num_steps: The maximum number of steps to run the agent.

Returns:
The result of the solve.
The result of the solve function.

Raises:
- ValueError: If the LLM inference failed.
Expand Down
4 changes: 2 additions & 2 deletions src/google/adk/agents/llm_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ async def _run_async_impl(
self.__maybe_save_output_to_state(event)
yield event
if ctx.should_pause_invocation(event):
# Do not pause immediately, wait until the long running tool call is
# Do not pause immediately, wait until the long-running tool call is
# executed.
should_pause = True
if should_pause:
Expand All @@ -479,7 +479,7 @@ async def _run_async_impl(
events = ctx._get_events(current_invocation=True, current_branch=True)
if events and any(ctx.should_pause_invocation(e) for e in events[-2:]):
return
# Only yield an end state if the last event is no longer a long running
# Only yield an end state if the last event is no longer a long-running
# tool call.
ctx.set_agent_state(self.name, end_of_agent=True)
yield self._create_agent_state_event(ctx)
Expand Down
2 changes: 1 addition & 1 deletion src/google/adk/models/gemini_llm_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ async def send_realtime(self, input: RealtimeInput):
def __build_full_text_response(self, text: str):
"""Builds a full text response.

The text should not partial and the returned LlmResponse is not be
The text should not be partial and the returned LlmResponse is not
partial.

Args:
Expand Down
2 changes: 1 addition & 1 deletion src/google/adk/models/gemma_llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ def _get_last_valid_json_substring(text: str) -> tuple[bool, str | None]:
"""Attempts to find and return the last valid JSON object in a string.

This function is designed to extract JSON that might be embedded in a larger
text, potentially with introductory or concluding remarks. It will always chose
text, potentially with introductory or concluding remarks. It will always choose
the last block of valid json found within the supplied text (if it exists).

Args:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ async def prepare_auth_credentials(
credential = existing_credential or self.auth_credential
# fetch credential from adk framework
# Some auth scheme like OAuth2 AuthCode & OpenIDConnect may require
# multi-step exchange:
# multistep exchange:
# client_id , client_secret -> auth_uri -> auth_code -> access_token
# adk framework supports exchange access_token already
# for other credential, adk can also get back the credential directly
Expand Down
12 changes: 6 additions & 6 deletions tests/integration/fixture/home_automation_agent/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,29 +138,29 @@ def set_device_info(


def get_temperature(location: str) -> int:
"""Get the current temperature in celsius of a location (e.g., 'Living Room', 'Bedroom', 'Kitchen').
"""Get the current temperature in Celsius of a location (e.g., 'Living Room', 'Bedroom', 'Kitchen').

Args:
location (str): The location for which to retrieve the temperature (e.g.,
'Living Room', 'Bedroom', 'Kitchen').

Returns:
int: The current temperature in celsius in the specified location, or
int: The current temperature in Celsius in the specified location, or
'Location not found' if the location does not exist.
"""
return TEMPERATURE_DB.get(location, "Location not found")


def set_temperature(location: str, temperature: int) -> str:
"""Set the desired temperature in celsius for a location.
"""Set the desired temperature in Celsius for a location.

Acceptable range of temperature: 18-30 celsius. If it's out of the range, do
Acceptable range of temperature: 18-30 Celsius. If it's out of the range, do
not call this tool.

Args:
location (str): The location where the temperature should be set.
temperature (int): The desired temperature as integer to set in celsius.
Acceptable range: 18-30 celsius.
temperature (int): The desired temperature as integer to set in Celsius.
Acceptable range: 18-30 Celsius.

Returns:
str: A message indicating whether the temperature was successfully set.
Expand Down