mirror of
https://github.com/EvolutionAPI/adk-python.git
synced 2025-12-26 06:57:43 -06:00
Copybara import of the project:
--21736067f9by 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 --08ac9a117eby 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 --fcbf57466eby 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-callbacks926b0ef1a6PiperOrigin-RevId: 753005846
This commit is contained in:
committed by
Copybara-Service
parent
dbbeb190b0
commit
27ce65ff50
@@ -147,3 +147,4 @@ line_length = 200
|
||||
[tool.pytest.ini_options]
|
||||
testpaths = ["tests"]
|
||||
asyncio_default_fixture_loop_scope = "function"
|
||||
asyncio_mode = "auto"
|
||||
|
||||
Reference in New Issue
Block a user