Commit Graph

276 Commits

Author SHA1 Message Date
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
Bart
24024f7fc4
chore: Improves session update time validation message (#446)
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.

Co-authored-by: Hangfei Lin <hangfei@google.com>
2025-05-03 07:55:47 -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
Wei Sun (Jack)
6595cda037 Update description of before/after_agent_callback to clarify the behavior.
PiperOrigin-RevId: 754207459
2025-05-02 18:57:50 -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
Tanmay Ghare
da677b7a34
chore: Fix typos in CONTRIBUTING.md (#460)
Co-authored-by: Hangfei Lin <hangfei@google.com>
2025-05-02 17:35:39 -07:00
Ankur Sharma
4289e02854 Update the 'type' value on the items/properties nested structures for Anthropic models to adhere to JSON schema.
PiperOrigin-RevId: 754154596
2025-05-02 15:30:44 -07:00
Shangjie Chen
bcf1deb582 ADK changes
PiperOrigin-RevId: 754131080
2025-05-02 14:19:18 -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
Hangfei Lin
8f94a0c7b3 ADK v0.4.0 release.
PiperOrigin-RevId: 754103716
2025-05-02 12:56:42 -07:00
Divyansh Shukla
4f48ea1c08 ADK changes
PiperOrigin-RevId: 754103075
2025-05-02 12:54:38 -07:00
Wei Sun (Jack)
3fddac5813
Merge pull request #256 from sumant-pangotra/#247-OpenAPIToolSet-Considering-Required-parameters
fix: #247 OpenAPIToolSet Parameter required field and description 

Merged in e8fb4ed3fc
2025-05-02 10:47:28 -07:00
Wei Sun (Jack)
9b52ce28f5
Merge branch 'main' into #247-OpenAPIToolSet-Considering-Required-parameters 2025-05-02 10:46:47 -07:00
sumant-pangotra
e8fb4ed3fc Copybara import of the project:
--
27b214df3e by Sumant Pangotra <sumantpangotra@gmail.com>:

Fixed Parameter required field and description

COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/256 from sumant-pangotra:#247-OpenAPIToolSet-Considering-Required-parameters 42f87a9c94
PiperOrigin-RevId: 754050217
2025-05-02 10:23:49 -07:00
sumant-pangotra
42f87a9c94
Merge branch 'main' into #247-OpenAPIToolSet-Considering-Required-parameters 2025-05-02 12:06:41 +05:30
Xiang (Sean) Zhou
d387ab0c38 don't send content with empty text to LLM
PiperOrigin-RevId: 753869699
2025-05-01 23:01:50 -07:00
Wei Sun (Jack)
f12300113d
Merge branch 'main' into #247-OpenAPIToolSet-Considering-Required-parameters 2025-05-01 18:47:28 -07:00
Selcuk Gun
6c0a0d69ca Add pyink-annotation-pragmas to match google formatting
PiperOrigin-RevId: 753778114
2025-05-01 16:50:36 -07:00
Wei Sun
23b41c3f94 Uses google's profile for isort.
PiperOrigin-RevId: 753619497
2025-05-01 09:31:06 -07:00
Shangjie Chen
14933ba470 feat: Extract content encode/decode logic to a shared util and resolve issues with JSON serialization.
feat: Update key length for DB table to avoid key too long issue in mysql

PiperOrigin-RevId: 753614879
2025-05-01 09:13:28 -07:00
Wei Sun
b691904e57 chore: Adds a github action to check pyformat via pyink.
PiperOrigin-RevId: 753246116
2025-04-30 11:28:12 -07:00
Wei Sun (Jack)
641781bced
Merge pull request #434 from AlankritVerma01/support-async-tool-callbacks
feat(llm_flows): support async before/after tool callbacks
2025-04-29 22:49:18 -07:00
Wei Sun (Jack)
c4e09a2edb
Merge branch 'main' into support-async-tool-callbacks 2025-04-29 22:48:45 -07:00
João Campista
acbbdb7266 Copybara import of the project:
--
709e1dd079d03d7eb4d742b9448ed3d1b946ff30 by joao.campista <joaocampista@proton.me>:

feat: add ordering to recent events in database session service
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/454 from lugui-co:main 912503f972c9cbd8982f2b7f8b210d4e0fe08b69
PiperOrigin-RevId: 753013663
2025-04-29 22:13:41 -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
Alankrit Verma
926b0ef1a6
Merge branch 'main' into support-async-tool-callbacks 2025-04-29 22:08:18 -04:00
Xiang (Sean) Zhou
dbbeb190b0 Add two adk run options:
--replay : a json file that contains the initial session state and user queries, adk run will create a new session based on the state and run the user queries against the session. Users cannot continue to interact with agent.

--resume : a json file that contains the previously saved session (by --save_session option), adk run will replay this session and then user can continue to interact with the agent.
PiperOrigin-RevId: 752923403
2025-04-29 16:23:10 -07:00
Shangjie Chen
2a9ddec7e3 Set the max size of strings in database columns.
PiperOrigin-RevId: 752918808
2025-04-29 16:07:45 -07:00
Xiang (Sean) Zhou
2ea4315e9f update the doc comments of requested_auth_configs to make it more precise.
PiperOrigin-RevId: 752861847
2025-04-29 13:33:37 -07:00
Wei Sun (Jack)
67b6fbbe01
chore: Adds a github action to check pyformat via pyink. (#440)
* Adds pyink.yml github action to check file format

* Update pyink.yml to give recommended commands.
2025-04-29 09:39:18 -07:00
Alankrit Verma
fcbf57466e refactor: update callback type signatures to support sync and async responses 2025-04-29 09:02:09 -04:00
Alankrit Verma
504aa6ba06
Merge branch 'main' into support-async-tool-callbacks 2025-04-28 23:21:10 -04:00
Alankrit Verma
08ac9a117e 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
2025-04-28 23:16:43 -04:00
Paul Lam
4ae8d72a8d
docs: correct typo in conversion_utils.py (#351)
* docs: correct typo in conversion_utils.py

* docs: edited for conciseness
2025-04-28 19:47:34 -07:00
Alankrit Verma
21736067f9 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
2025-04-28 14:36:25 -04:00
Shangjie Chen
9a9f7a3765 Update callback comments.
PiperOrigin-RevId: 752162448
2025-04-27 22:20:02 -07:00
Hangfei Lin
aa7a98ad9d update readme
PiperOrigin-RevId: 751168005
2025-04-24 15:50:09 -07:00
Yifan Wang
a5bf6e3608 ADK changes
PiperOrigin-RevId: 751099184
2025-04-24 12:48:31 -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
Wei Sun (Jack)
e6109b1dd6 Copybara import of the project:
--
005028831b2e0873414db62af9ec02ef47a670d2 by Wei Sun (Jack) <weisun@google.com>:

Excludes tests/unittests/tools/application_integration_tool/clients/test_connections_client.py from python-unit-tests.yml
--
42ed38ff814f1a4811468d78cf1872869279919d by Wei Sun (Jack) <weisun@google.com>:

reorder skipped tests in python-unit-tests.yml

COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/368 from google:fix-unittests 42ed38ff814f1a4811468d78cf1872869279919d
PiperOrigin-RevId: 750782234
2025-04-23 17:35:34 -07:00
Google Team Member
ca993277de ADK changes
PiperOrigin-RevId: 750763037
2025-04-23 16:28:57 -07:00
Wei Sun
a49d339251 bump version number to 0.3.0.
PiperOrigin-RevId: 750661619
2025-04-23 11:22:54 -07:00
Wei Sun (Jack)
04e4c85b4e
Merge pull request #355 from wyf7107/live-error-toast
fix: Add error toast message when live does not work with certain models
2025-04-22 22:26:38 -07:00
Yifan
3ad939d34c Copybara import of the project:
--
dc53678606 by Yifan Wang <wanyif@google.com>:

Update Google Search Tool display to the correct one

--
bbeb6525ea by Yifan Wang <wanyif@google.com>:

add license header to complied js file

--
db5ea6bc56 by Yifan Wang <wanyif@google.com>:

fix: Enable error toast when live does not work with certain models
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/355 from wyf7107:live-error-toast 2062aa38a7
PiperOrigin-RevId: 750449832
2025-04-22 22:09:59 -07:00
Yifan
2062aa38a7
Merge branch 'main' into live-error-toast 2025-04-22 21:19:43 -07:00
Yifan Wang
db5ea6bc56 fix: Enable error toast when live does not work with certain models 2025-04-22 21:16:20 -07:00
Hangfei Lin
5c069cca8f
chore: Update README.md (#353)
add instruction about our releases.
2025-04-22 18:18:44 -07:00
Hangfei Lin
22cab9e9a4
chore: Update README.md (#328)
* chore: Update README.md

chore: update readme for contributing guideline

* chore: Update CONTRIBUTING.md

chore: Update CONTRIBUTING.md

* Update CONTRIBUTING.md
2025-04-22 17:20:24 -07:00