Commit Graph

433 Commits

Author SHA1 Message Date
Wei Sun (Jack)
f4c7d788b0 fix: build_graph is not awaited.
Fixes https://github.com/google/adk-python/issues/927

PiperOrigin-RevId: 764113488
2025-05-27 23:32:21 -07:00
Yifan Wang
15109c6879 fix: oauth fix for adk web
PiperOrigin-RevId: 764111115
2025-05-27 23:22:45 -07:00
Xiang (Sean) Zhou
d40df2edf2 chore: fix unit tests
PiperOrigin-RevId: 764107186
2025-05-27 23:07:29 -07:00
Yifan Wang
a66f12273c bump version number to 1.1.0.
PiperOrigin-RevId: 764026739
2025-05-27 18:17:04 -07:00
Yifan Wang
5d2a876ca8 feat:update minified adk web files
PiperOrigin-RevId: 763970627
2025-05-27 15:26:19 -07:00
Yifan Wang
0c4f52699b fix: serve web app at /dev-ui/
PiperOrigin-RevId: 763965859
2025-05-27 15:14:23 -07:00
Xiang (Sean) Zhou
618c824994 feat: extract agent loading logic from fast_api.py to a separate AgentLoader class and support more agent definition folder/file structure.
Structures supported:
a) agents_dir/agent_name.py (with root_agent or agent.root_agent in it)
b) agents_dir/agent_name_folder/__init__.py (with root_agent or agent.root_agent in the package)
c) agents_dir/agent_name_folder/agent.py (where agent.py has root_agent)

PiperOrigin-RevId: 763943716
2025-05-27 14:14:51 -07:00
Wei Sun (Jack)
16d9696012 fix: avoid duplicating log in stderr.
This was introduced to work around google-auth kills all logs via `google` root logging namespace. Given we're now using `google_adk` as root logging namesapce, we don't need additional Stream log handler now.

PiperOrigin-RevId: 763924531
2025-05-27 13:28:00 -07:00
Stephen Smith
03fe909ada Copybara import of the project:
--
b781880d9bfb9786bd5e50314eaedc441fc2a93e by Stephen Smith <stephen.smith@newfront.com>:

Telemetry unit test for non-serializable data.

--
179da9db997bb3f992e126c9c64193ff7df67b3d by Stephen Smith <stephen.smith@newfront.com>:

When converting the llm_request to JSON, skip non-serializable data.

--
5dc68f4f5a6d12b753fdb81d1449716d13490afb by Stephen Smith <stephen.smith@newfront.com>:

Update _create_invocation_context() return type to InvocationContext.

--
23a33f754409fcd2a7641098d68cef7e4f1c72c6 by Stephen Smith <stephen.smith@newfront.com>:

Oops, remove unnecessary import.

COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/879 from stephensmithnewfront:main f71e195a9ed157e4c0b3abfa74ae078b0c1a920a
PiperOrigin-RevId: 763922003
2025-05-27 13:21:44 -07:00
Google Team Member
b79400162d Use audio player component in the artifact tab
PiperOrigin-RevId: 763875097
2025-05-27 11:23:04 -07:00
Yongsul Kim
c024ac5762 Align event filtering and ordering logic
Copybara import of the project:

--
d01a8fd5f079bc4fca9e4b71796dbe65312ce9ff by Leo Yongsul Kim <ystory84@gmail.com>:

fix(DatabaseSessionService): Align event filtering and ordering logic

This commit addresses inconsistencies in how DatabaseSessionService
handles config.after_timestamp and config.num_recent_events
parameters, aligning its behavior with InMemorySessionService and
VertexAiSessionService.

Key changes:
- Made after_timestamp filtering inclusive
- Corrected num_recent_events behavior to fetch the N most recent events
- Refined timezone handling for after_timestamp
- Updated the unit test test_get_session_with_config to includeSessionServiceType.DATABASE, allowing verification of these fixes.

Fixes #911

COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/915 from ystory:fix/database-session-timestamp-recency 5cc8cf5f5a5c0cb3e87f6ab178a5725d3f696c88
PiperOrigin-RevId: 763874840
2025-05-27 11:22:04 -07:00
Wei Sun (Jack)
19ca61d241 fix: model_config is misplaced for EvalMetricResultPerInvocation.
PiperOrigin-RevId: 763648920
2025-05-26 23:50:05 -07:00
Xiang (Sean) Zhou
7c2df7e4f6 refactor: refactor evaluation to make cli module depends on evaluation module. Modules outside of cli module should not reference cli module
PiperOrigin-RevId: 763577749
2025-05-26 19:18:55 -07:00
Wei Sun (Jack)
d43c80b718 chore: updates mypy config in pyproject.toml.
1. Use non-strict as starting point;
2. Apply python_version to 3.9.
3. Sets `follow_imports` to skip.

PiperOrigin-RevId: 763553672
2025-05-26 17:25:48 -07:00
Xiang (Sean) Zhou
be0786ea88 refactor: rename agent_dir to agents_dir and rename app_id to app_name in fast_api.py to make it consistent among every endpoints
PiperOrigin-RevId: 763483339
2025-05-26 11:51:19 -07:00
Wei Sun (Jack)
6b89ceb49a fix: mutable object cannot be default value in parameter.
PiperOrigin-RevId: 763479612
2025-05-26 11:32:07 -07:00
Xiang (Sean) Zhou
694eca08e5 fix: fix bigquery credentials and bigquery tool to make it compatible with python 3.9 and make the credential serializable in session
PiperOrigin-RevId: 763332829
2025-05-26 01:58:52 -07:00
Google Team Member
55cb36edfe Add handling for None param.annotation.
This is the case for function tools that have no return value.

PiperOrigin-RevId: 763306054
2025-05-26 00:21:15 -07:00
Xiang (Sean) Zhou
74a331f1fb chore: reformat the code with autoformat.sh
PiperOrigin-RevId: 763256626
2025-05-25 20:33:45 -07:00
Xiang (Sean) Zhou
98c8a71d67 refactor: rename parameter name and add type annotation of _get_agent_to_run method
PiperOrigin-RevId: 763234780
2025-05-25 18:56:16 -07:00
Xiang (Sean) Zhou
b0fb3536e5 chore: cleanup unused import in cli module
PiperOrigin-RevId: 763233551
2025-05-25 18:50:31 -07:00
Calvin Giles
1a43cf0f60 Copybara import of the project:
--
73826d258b136f92a8da8171f7dc14d5f07de8dd by Calvin Giles <calvin.giles@trademe.co.nz>:

fix: Enable InMemoryRunner to be used in async tests
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/868 from calvingiles:enable-test-runner-in-async fb9033ed6f350a3114859715cae51798f864ecf6
PiperOrigin-RevId: 763233472
2025-05-25 18:49:35 -07:00
Xiang (Sean) Zhou
a380d70ac7 chore: fix cli UT
PiperOrigin-RevId: 762734348
2025-05-24 00:11:32 -07:00
Xiang (Sean) Zhou
a134ba6f7a feat: add toolset cleanup logic to run_cli
PiperOrigin-RevId: 762638389
2025-05-23 18:06:30 -07:00
Yifan Wang
7067c0319d fix: adk web now can be served under custom route
PiperOrigin-RevId: 762629432
2025-05-23 17:35:44 -07:00
Xiang (Sean) Zhou
756a326033 feat: add customized bigquer tool wrapper class to facilitate developer to handcraft bigquery api tool
PiperOrigin-RevId: 762626700
2025-05-23 17:23:41 -07:00
Hangfei Lin
0e284f45ff Copybara import of the project:
--
76f579c8f75e28c79e322dc60c9dca56ac96d0fa by Hangfei Lin <hangfei@google.com>:

doc: Update README.md
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/901 from google:hangfei-patch-3 6c5e264c8134e8eb164114992f3d8f2f2efe83fc
PiperOrigin-RevId: 762603928
2025-05-23 16:10:22 -07:00
Google Team Member
8076b2294f ADK changes
PiperOrigin-RevId: 762573275
2025-05-23 14:41:27 -07:00
Ariz Chang
f1a92e9674 chore: add google search agent for testing
PiperOrigin-RevId: 762571269
2025-05-23 14:36:27 -07:00
Google Team Member
717993b14f Fix eval history cases can't be toggled
PiperOrigin-RevId: 762561171
2025-05-23 14:06:35 -07:00
Shangjie Chen
d212e50c10 feat:Make VertexAiSessionService true async.
PiperOrigin-RevId: 762547133
2025-05-23 13:31:38 -07:00
Google Team Member
79681e3513 Write eval results locally from adk eval cli.
PiperOrigin-RevId: 762499588
2025-05-23 11:16:00 -07:00
Google Team Member
33921d524f Add click event to the image in chat window.
PiperOrigin-RevId: 762473152
2025-05-23 10:12:15 -07:00
Xiang (Sean) Zhou
92c37496d3 refactor: simplify toolset cleanup codes and extract common cleanup codes to utils which could be utilized by cli or client codes that directly call runners
PiperOrigin-RevId: 762463028
2025-05-23 09:49:19 -07:00
Wei Sun (Jack)
b9b2c3fb54 chore: Adds autoformat.sh for formatting codebase.
PiperOrigin-RevId: 762301862
2025-05-23 00:41:18 -07:00
Stephen Smith
b4c4f88c22 Copybara import of the project:
--
aa92081193ccf4710e5aefb93c715791eab2c2ef by Stephen Smith <stephen.smith@newfront.com>:

docs: Fix typos in issue templates.
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/880 from stephensmithnewfront:stephensmithnewfront/address-typos-in-issue-templates-pr 65b7f85e26fca76b3e076ef0b826189353e8ab13
PiperOrigin-RevId: 762259304
2025-05-22 21:57:09 -07:00
sudu
68de9adc18 Copybara import of the project:
--
004eb36c16b042ba2d8be0cca39b739c0c8ca6c1 by sudu <teric@outlook.com>:

Update tools.yaml

When search hotels with some LLM, the date format shows as bellow
```
**Check-in Date:** April 23, 2024
```
So i update the SQL in tools.yaml to be compatible with following instruction:
```sql
update checkin date to 'April 24,2024' and checkout date to 'April 26,2024' of Best Western Bern
```
--
1300688ee1407212658d57712c1ad6ee61b052fe by qidu <qidu@outlook.com>:

Fix the tools of `ToolboxToolset` initialization bugs for
`samples/toolbox_agent`

COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/794 from qidu:main 5b3199da564efdd07915e24e75659055a17dad82
PiperOrigin-RevId: 762259287
2025-05-22 21:56:18 -07:00
Sasha Sobran
0026edc1c9 chore: update filtered schema parameters for Gemini API.
PiperOrigin-RevId: 762209590
2025-05-22 18:39:58 -07:00
GenkiNoguchi
d3910e7b8c Copybara import of the project:
--
3fb305691e0ecc8b75d56d0b9ef43c97cef8f773 by ammmr <m.hoshii777@gmail.com>:

fix: add missing await in runner run_live
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/849 from ammmr:patch-missing-await-in-runner-run-live b75b5d0105f18eaa06a0d7fb7d608b05eb59b3c9
PiperOrigin-RevId: 762113004
2025-05-22 13:55:00 -07:00
Google Team Member
30e10c87c5 feat:Integrate audio player component in the chat window.
PiperOrigin-RevId: 762105827
2025-05-22 13:37:37 -07:00
Wei Sun (Jack)
fe618c3d93 chore: use relative import in google_api_toolsets.py. Adds open source header for base_toolset.py
PiperOrigin-RevId: 762042799
2025-05-22 11:13:57 -07:00
Wei Sun (Jack)
a63ea2735c chore: Removes unused import.
PiperOrigin-RevId: 762039696
2025-05-22 11:05:45 -07:00
Xiang (Sean) Zhou
ff8a3c9b43 chore: reformat the codes using autoformat.sh
PiperOrigin-RevId: 762004002
2025-05-22 09:43:54 -07:00
Xiang (Sean) Zhou
a2263b1808 refactor: refactor toolset to extract tool_filter logic to base class
PiperOrigin-RevId: 761828251
2025-05-21 23:54:33 -07:00
Wei Sun (Jack)
e0851a1e57 chore: batch organize imports.
PiperOrigin-RevId: 761824628
2025-05-21 23:40:47 -07:00
Liang Wu
09f30afe10 fix: failed unit test for Gemini model headers.
Root cause is that GenAI SDK updated their logic of adding headers in the latest version.

PiperOrigin-RevId: 761751413
2025-05-21 18:40:16 -07:00
Google Team Member
4542af5650 Fix ollama issues with ChatCompletionAssistantToolCall
PiperOrigin-RevId: 761732316
2025-05-21 17:27:01 -07:00
Google Team Member
505d936007 The saved filename should include the original file name instead of a generated one.
PiperOrigin-RevId: 761727488
2025-05-21 17:09:47 -07:00
Hangfei Lin
d7af2b2815 Copybara import of the project:
--
cd8c580cbd4a2dc1c49c690ea81c4111860aa52c by Hangfei Lin <hangfei@google.com>:

doc: Update README.md
COPYBARA_INTEGRATE_REVIEW=https://github.com/google/adk-python/pull/842 from google:hangfei-patch-2 aa9842a43d8c464a8999beb2f6f5d491aa63ef6c
PiperOrigin-RevId: 761722188
2025-05-21 16:54:40 -07:00
Selcuk Gun
41b33d4a0a Move public_utils to utils in tests
Renamed conflicting utils.py as testing_utils.py

PiperOrigin-RevId: 761715808
2025-05-21 16:35:11 -07:00