Commit Graph

23 Commits

Author SHA1 Message Date
Selcuk Gun
794a70edcd Support async agent and model callbacks
PiperOrigin-RevId: 755542756
2025-05-06 15:14:10 -07:00
Allen
1393965720 Fix: config.after_timestamp behavior in InMemorySessionService.get_session() and add a test
Copybara import of the project:

--
c1d0d649b5aae1322a02dbaa586822d69b8546f6 by allengour <allengour@google.com>:

fix: fix and test `config.after_timestamp` behavior in `InMemorySessionService.get_session()`
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/438 from allengour:fix/issue-437-after_timestamp-behavior 4b49a5e6509b5ad9dd9103a6dc357fd44c101f31
PiperOrigin-RevId: 755492201
2025-05-06 13:09:59 -07:00
Shangjie Chen
905c20dad6 ADK changes
PiperOrigin-RevId: 755201925
2025-05-05 21:58:47 -07:00
Hangfei Lin
a7b4c98253 fix: Handle the case when parameter.required is None and fix tests
PiperOrigin-RevId: 754519323
2025-05-03 22:39:28 -07:00
Bart
ad4226b3d8 Copybara import of the project:
--
1ca16aba5b7b869afa8e0a0cddaea539acd737f5 by bart.lee(이철민)/kakao <bart.lee@kakaocorp.com>:

chore: Improves session update time validation message

Enhances the error message when a session's last update time is later than the storage update time.
This provides better readability by formatting the timestamps in the error message.

COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/446 from kakao-bart-lee:main a2a0cff036429b61bd7cf1600fc4c2c0cf50089d
PiperOrigin-RevId: 754452381
2025-05-03 17:07:53 -07:00
Hangfei Lin
81aa11f070
fix: Update test_operation_parser.py 2025-05-03 14:50:30 -07:00
Hangfei Lin
a6b3c23f74
fix: fix typo in function name in unit tests(test_rest_api_tool.py)
fix: fix typo in function name in unit tests
2025-05-03 14:25:36 -07:00
Xiang (Sean) Zhou
5846b24b71 set param required tag to False by default
PiperOrigin-RevId: 754382785
2025-05-03 10:31:38 -07:00
Nilesh
c74879d849
fix: Correct various typos in CHANGELOG.md and test_rest_api_tool.py (#498)
Corrected the following spelling errors:
 - CHANGELOG.md: "impprovements" -> "improvements"
 - test_rest_api_tool.py: "def sample_endpiont:" -> "def sample_endpoint:"
 - Updated all the references of sample_endpiont -> sample_endpoint as well.
 - CHANGELOG.md: "credentails" -> "credentials"
 - CHANGELOG.md: "auido" -> "audio"

Co-authored-by: Hangfei Lin <hangfei@google.com>
2025-05-02 23:12:00 -07:00
Hangfei Lin
60d23c028f ADK changes
PiperOrigin-RevId: 754193272
2025-05-02 17:53:31 -07:00
Nilesh
eff5903175 Copybara import of the project:
--
6c3b8b5fa2eb9805c6f723f560e5526649dd61f0 by knileshh <neutron_stays@protonmail.com>:

fix: Correct various typos in CHANGELOG.md and test_rest_api_tool.py

Corrected the following spelling errors:
 - CHANGELOG.md: "impprovements" -> "improvements"
 - test_rest_api_tool.py: "def sample_endpiont:" -> "def sample_endpoint:"
 - CHANGELOG.md: "credentails" -> "credentials"
 - CHANGELOG.md: "auido" -> "audio"

COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/498 from knileshh:main caadbdbd78e3dc757b494f3f4d45991e88eac30d
PiperOrigin-RevId: 754189420
2025-05-02 17:36:16 -07:00
hsuyuming
879064343c Copybara import of the project:
--
ad923c2c8c503ba73c62db695e88f1a3ea1aeeea by YU MING HSU <abego452@gmail.com>:

docs: enhance Contribution process within CONTRIBUTING.md

--
8022924fb7e975ac278d38fce3b5fd593d874536 by YU MING HSU <abego452@gmail.com>:

fix: move _maybe_append_user_content from google_llm.py to base_llm.py,
so subclass can get benefit from it, call _maybe_append_user_content
from generate_content_async within lite_llm.py

--
cf891fb1a3bbccaaf9d0055b23f614ce52449977 by YU MING HSU <abego452@gmail.com>:

fix: modify install dependencies cmd, and use pyink to format codebase
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/428 from hsuyuming:fix_litellm_error_issue_427 dbec4949798e6399a0410d1b8ba7cc6a7cad7bdd
PiperOrigin-RevId: 754124679
2025-05-02 13:59:50 -07:00
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
Ankur Sharma
f872577f68 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.
PiperOrigin-RevId: 751023475
2025-04-24 09:31:40 -07:00
Google Team Member
ca993277de ADK changes
PiperOrigin-RevId: 750763037
2025-04-23 16:28:57 -07:00
Xiang (Sean) Zhou
956fb912e8 feat(auth)!: expose access_token and refresh_token at top level of auth credentails
BREAKING CHANGE: `token` attribute of OAuth2Auth credentials used to be a dict containing both access_token and refresh_token, given that may cause confusions, now we replace it with access_token and refresh_token at top level of the auth credentials

PiperOrigin-RevId: 750346172
2025-04-22 15:23:21 -07:00
Che Liu
21d2047ddc ADK changes
PiperOrigin-RevId: 749973427
2025-04-21 17:28:53 -07:00
Trần Đặng Trung Đức
e31cd0b5f8 No public description
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/243 from trandangtrungduc:fix_typos 6e317d69de
PiperOrigin-RevId: 749106557
2025-04-18 12:07:52 -07:00
Google ADK Member
61d4be2d76 No public description
PiperOrigin-RevId: 748777998
2025-04-17 21:47:59 +00:00
Selcuk Gun
9a44831a08
Add parallel tool call support for litellm (#172)
Co-authored-by: Hangfei Lin <hangfei@google.com>
2025-04-14 17:42:33 -07:00
Selcuk Gun
cfbcc17644
Fix empty list in content on tool calls causing ollama parse error (#102)
This is related to google/adk-python#49
2025-04-12 17:34:57 -07:00
fangyh20
089c1e6428
Fix typos in docstrings of evaluation_generator.py and event.py (#101) (#121)
* Fix typos in docstrings of evaluation_generator.py and event.py (#101)

Corrected 'resposnes' to 'responses', 'uncertainity' to 'uncertainty', 'conversaction' to 'conversation', and 'exeuction' to 'execution' in relevant docstrings for clarity.

* Fix typos in docstrings and comments across multiple files

Corrected 'detla' to 'delta', 'buil-in' to 'built-in', 'walkaround' to 'workaround', and 'conversaction' to 'conversation' for clarity in relevant files. Updated comments for consistency.

---------

Co-authored-by: Hangfei Lin <hangfei@google.com>
2025-04-12 09:55:22 -07:00
Jack Sun
05142a07cc
Moves unittests to root folder and adds github action to run unit tests. (#72)
* Move unit tests to root package.

* Adds deps to "test" extra, and mark two broken tests in tests/unittests/auth/test_auth_handler.py

* Adds github workflow

* minor fix in lite_llm.py for python 3.9.

* format pyproject.toml
2025-04-11 08:25:59 -07:00