adk-python/tests/unittests
Alankrit Verma 27ce65ff50 Copybara import of the project:
--
21736067f9 by Alankrit Verma <alankrit386@gmail.com>:

feat(llm_flows): support async before/after tool callbacks

Previously, callbacks were treated as purely synchronous,
so passing an async coroutine caused “was never awaited”
errors and Pydantic serialization failures.

Now we detect awaitable return values from
before_tool_callback and after_tool_callback,
and `await` them if necessary.

Fixes: #380

--
08ac9a117e by Alankrit Verma <alankrit386@gmail.com>:

Refactor function callback handling and update type signatures

- Simplify variable names in `functions.py`: always use `function_response` and `altered_function_response`
- Update LlmAgent callback type aliases to support async:
  - Import `Awaitable`
  - Change `BeforeToolCallback` and `AfterToolCallback` signatures to return `Awaitable[Optional[dict]]`
- Ensure `after_tool_callback` uses `await` when necessary

--
fcbf57466e by Alankrit Verma <alankrit386@gmail.com>:

refactor: update callback type signatures to support sync and async responses
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/434 from AlankritVerma01:support-async-tool-callbacks 926b0ef1a6
PiperOrigin-RevId: 753005846
2025-04-29 21:40:33 -07:00
..
agents Moves unittests to root folder and adds github action to run unit tests. (#72) 2025-04-11 08:25:59 -07:00
artifacts Moves unittests to root folder and adds github action to run unit tests. (#72) 2025-04-11 08:25:59 -07:00
auth feat(auth)!: expose access_token and refresh_token at top level of auth credentails 2025-04-22 15:23:21 -07:00
cli No public description 2025-04-17 21:47:59 +00:00
evaluation No public description 2025-04-17 21:47:59 +00:00
fast_api Moves unittests to root folder and adds github action to run unit tests. (#72) 2025-04-11 08:25:59 -07:00
flows Copybara import of the project: 2025-04-29 21:40:33 -07:00
models Add parallel tool call support for litellm (#172) 2025-04-14 17:42:33 -07:00
sessions No public description 2025-04-17 21:47:59 +00:00
streaming Moves unittests to root folder and adds github action to run unit tests. (#72) 2025-04-11 08:25:59 -07:00
tools Currently if a model calls a FunctionTool without all the mandatory parameters, the code will just break. This change basically adds the capability for the FunctionTool to identify if the model is missing required arguments, and in that case, instead of breaking the execution, it provides a error message to the model so it could fix the request and retry. 2025-04-24 09:31:40 -07:00
__init__.py Moves unittests to root folder and adds github action to run unit tests. (#72) 2025-04-11 08:25:59 -07:00
conftest.py Moves unittests to root folder and adds github action to run unit tests. (#72) 2025-04-11 08:25:59 -07:00
utils.py Moves unittests to root folder and adds github action to run unit tests. (#72) 2025-04-11 08:25:59 -07:00