google-adk 0.0.2__py3-none-any.whl → 0.0.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- google/adk/._version.py +0 -0
- google/adk/cli/agent_graph.py +31 -5
- google/adk/cli/browser/index.html +1 -1
- google/adk/cli/browser/{main-XUU6OGCC.js → main-SY2WYYGV.js} +1 -1
- google/adk/cli/cli_tools_click.py +51 -6
- google/adk/cli/fast_api.py +19 -9
- google/adk/docs/Makefile +20 -0
- google/adk/docs/build/doctrees/google-adk.doctree +0 -0
- google/adk/docs/build/html/_sources/google-adk.rst.txt +98 -0
- google/adk/docs/build/html/_sources/index.rst.txt +7 -0
- google/adk/docs/build/html/_static/autodoc_pydantic.css +27 -0
- google/adk/docs/build/html/_static/basic.css +925 -0
- google/adk/docs/build/html/_static/debug.css +85 -0
- google/adk/docs/build/html/_static/doctools.js +156 -0
- google/adk/docs/build/html/_static/documentation_options.js +29 -0
- google/adk/docs/build/html/_static/file.png +0 -0
- google/adk/docs/build/html/_static/language_data.js +199 -0
- google/adk/docs/build/html/_static/minus.png +0 -0
- google/adk/docs/build/html/_static/plus.png +0 -0
- google/adk/docs/build/html/_static/pygments.css +274 -0
- google/adk/docs/build/html/_static/scripts/furo-extensions.js +16 -0
- google/adk/docs/build/html/_static/scripts/furo.js +19 -0
- google/adk/docs/build/html/_static/scripts/furo.js.LICENSE.txt +7 -0
- google/adk/docs/build/html/_static/scripts/furo.js.map +1 -0
- google/adk/docs/build/html/_static/searchtools.js +620 -0
- google/adk/docs/build/html/_static/skeleton.css +312 -0
- google/adk/docs/build/html/_static/sphinx_highlight.js +170 -0
- google/adk/docs/build/html/_static/styles/furo-extensions.css +18 -0
- google/adk/docs/build/html/_static/styles/furo-extensions.css.map +1 -0
- google/adk/docs/build/html/_static/styles/furo.css +18 -0
- google/adk/docs/build/html/_static/styles/furo.css.map +1 -0
- google/adk/docs/build/html/genindex.html +861 -0
- google/adk/docs/build/html/google-adk.html +5461 -0
- google/adk/docs/build/html/index.html +567 -0
- google/adk/docs/build/html/objects.inv +0 -0
- google/adk/docs/build/html/py-modindex.html +373 -0
- google/adk/docs/build/html/search.html +333 -0
- google/adk/docs/build/html/searchindex.js +17 -0
- google/adk/docs/source/conf.py +133 -0
- google/adk/docs/source/google-adk.rst +98 -0
- google/adk/docs/source/index.rst +7 -0
- google/adk/version.py +1 -1
- {google_adk-0.0.2.dist-info → google_adk-0.0.3.dist-info}/METADATA +1 -1
- {google_adk-0.0.2.dist-info → google_adk-0.0.3.dist-info}/RECORD +46 -14
- google/adk/cli/media_streamer/__init__.py +0 -19
- google/adk/cli/media_streamer/index.html +0 -228
- google/adk/tests/integration/fixture/flow_complex_spark/sample.debug.log +0 -243
- google_adk-0.0.2.dist-info/LICENSE +0 -202
- {google_adk-0.0.2.dist-info → google_adk-0.0.3.dist-info}/WHEEL +0 -0
- {google_adk-0.0.2.dist-info → google_adk-0.0.3.dist-info}/entry_points.txt +0 -0
google/adk/._version.py
ADDED
Binary file
|
google/adk/cli/agent_graph.py
CHANGED
@@ -12,6 +12,9 @@
|
|
12
12
|
# See the License for the specific language governing permissions and
|
13
13
|
# limitations under the License.
|
14
14
|
|
15
|
+
from __future__ import annotations
|
16
|
+
|
17
|
+
import logging
|
15
18
|
from typing import Union
|
16
19
|
|
17
20
|
import graphviz
|
@@ -21,7 +24,15 @@ from ..agents.llm_agent import LlmAgent
|
|
21
24
|
from ..tools.agent_tool import AgentTool
|
22
25
|
from ..tools.base_tool import BaseTool
|
23
26
|
from ..tools.function_tool import FunctionTool
|
24
|
-
|
27
|
+
|
28
|
+
logger = logging.getLogger(__name__)
|
29
|
+
|
30
|
+
try:
|
31
|
+
from ..tools.retrieval.base_retrieval_tool import BaseRetrievalTool
|
32
|
+
except ModuleNotFoundError:
|
33
|
+
retrieval_tool_module_loaded = False
|
34
|
+
else:
|
35
|
+
retrieval_tool_module_loaded = True
|
25
36
|
|
26
37
|
|
27
38
|
def build_graph(graph, agent: BaseAgent, highlight_pairs):
|
@@ -38,9 +49,12 @@ def build_graph(graph, agent: BaseAgent, highlight_pairs):
|
|
38
49
|
raise ValueError(f'Unsupported tool type: {tool_or_agent}')
|
39
50
|
|
40
51
|
def get_node_caption(tool_or_agent: Union[BaseAgent, BaseTool]):
|
52
|
+
|
41
53
|
if isinstance(tool_or_agent, BaseAgent):
|
42
54
|
return '🤖 ' + tool_or_agent.name
|
43
|
-
elif isinstance(
|
55
|
+
elif retrieval_tool_module_loaded and isinstance(
|
56
|
+
tool_or_agent, BaseRetrievalTool
|
57
|
+
):
|
44
58
|
return '🔎 ' + tool_or_agent.name
|
45
59
|
elif isinstance(tool_or_agent, FunctionTool):
|
46
60
|
return '🔧 ' + tool_or_agent.name
|
@@ -49,19 +63,31 @@ def build_graph(graph, agent: BaseAgent, highlight_pairs):
|
|
49
63
|
elif isinstance(tool_or_agent, BaseTool):
|
50
64
|
return '🔧 ' + tool_or_agent.name
|
51
65
|
else:
|
52
|
-
|
66
|
+
logger.warning(
|
67
|
+
'Unsupported tool, type: %s, obj: %s',
|
68
|
+
type(tool_or_agent),
|
69
|
+
tool_or_agent,
|
70
|
+
)
|
71
|
+
return f'❓ Unsupported tool type: {type(tool_or_agent)}'
|
53
72
|
|
54
73
|
def get_node_shape(tool_or_agent: Union[BaseAgent, BaseTool]):
|
55
74
|
if isinstance(tool_or_agent, BaseAgent):
|
56
75
|
return 'ellipse'
|
57
|
-
elif isinstance(
|
76
|
+
elif retrieval_tool_module_loaded and isinstance(
|
77
|
+
tool_or_agent, BaseRetrievalTool
|
78
|
+
):
|
58
79
|
return 'cylinder'
|
59
80
|
elif isinstance(tool_or_agent, FunctionTool):
|
60
81
|
return 'box'
|
61
82
|
elif isinstance(tool_or_agent, BaseTool):
|
62
83
|
return 'box'
|
63
84
|
else:
|
64
|
-
|
85
|
+
logger.warning(
|
86
|
+
'Unsupported tool, type: %s, obj: %s',
|
87
|
+
type(tool_or_agent),
|
88
|
+
tool_or_agent,
|
89
|
+
)
|
90
|
+
return 'cylinder'
|
65
91
|
|
66
92
|
def draw_node(tool_or_agent: Union[BaseAgent, BaseTool]):
|
67
93
|
name = get_node_name(tool_or_agent)
|
@@ -29,5 +29,5 @@
|
|
29
29
|
<style>html{color-scheme:dark}html{--mat-sys-background:light-dark(#fcf9f8, #131314);--mat-sys-error:light-dark(#ba1a1a, #ffb4ab);--mat-sys-error-container:light-dark(#ffdad6, #93000a);--mat-sys-inverse-on-surface:light-dark(#f3f0f0, #313030);--mat-sys-inverse-primary:light-dark(#c1c7cd, #595f65);--mat-sys-inverse-surface:light-dark(#313030, #e5e2e2);--mat-sys-on-background:light-dark(#1c1b1c, #e5e2e2);--mat-sys-on-error:light-dark(#ffffff, #690005);--mat-sys-on-error-container:light-dark(#410002, #ffdad6);--mat-sys-on-primary:light-dark(#ffffff, #2b3136);--mat-sys-on-primary-container:light-dark(#161c21, #dde3e9);--mat-sys-on-primary-fixed:light-dark(#161c21, #161c21);--mat-sys-on-primary-fixed-variant:light-dark(#41474d, #41474d);--mat-sys-on-secondary:light-dark(#ffffff, #003061);--mat-sys-on-secondary-container:light-dark(#001b3c, #d5e3ff);--mat-sys-on-secondary-fixed:light-dark(#001b3c, #001b3c);--mat-sys-on-secondary-fixed-variant:light-dark(#0f4784, #0f4784);--mat-sys-on-surface:light-dark(#1c1b1c, #e5e2e2);--mat-sys-on-surface-variant:light-dark(#44474a, #e1e2e6);--mat-sys-on-tertiary:light-dark(#ffffff, #2b3136);--mat-sys-on-tertiary-container:light-dark(#161c21, #dde3e9);--mat-sys-on-tertiary-fixed:light-dark(#161c21, #161c21);--mat-sys-on-tertiary-fixed-variant:light-dark(#41474d, #41474d);--mat-sys-outline:light-dark(#74777b, #8e9194);--mat-sys-outline-variant:light-dark(#c4c7ca, #44474a);--mat-sys-primary:light-dark(#595f65, #c1c7cd);--mat-sys-primary-container:light-dark(#dde3e9, #41474d);--mat-sys-primary-fixed:light-dark(#dde3e9, #dde3e9);--mat-sys-primary-fixed-dim:light-dark(#c1c7cd, #c1c7cd);--mat-sys-scrim:light-dark(#000000, #000000);--mat-sys-secondary:light-dark(#305f9d, #a7c8ff);--mat-sys-secondary-container:light-dark(#d5e3ff, #0f4784);--mat-sys-secondary-fixed:light-dark(#d5e3ff, #d5e3ff);--mat-sys-secondary-fixed-dim:light-dark(#a7c8ff, #a7c8ff);--mat-sys-shadow:light-dark(#000000, #000000);--mat-sys-surface:light-dark(#fcf9f8, #131314);--mat-sys-surface-bright:light-dark(#fcf9f8, #393939);--mat-sys-surface-container:light-dark(#f0eded, #201f20);--mat-sys-surface-container-high:light-dark(#eae7e7, #2a2a2a);--mat-sys-surface-container-highest:light-dark(#e5e2e2, #393939);--mat-sys-surface-container-low:light-dark(#f6f3f3, #1c1b1c);--mat-sys-surface-container-lowest:light-dark(#ffffff, #0e0e0e);--mat-sys-surface-dim:light-dark(#dcd9d9, #131314);--mat-sys-surface-tint:light-dark(#595f65, #c1c7cd);--mat-sys-surface-variant:light-dark(#e1e2e6, #44474a);--mat-sys-tertiary:light-dark(#595f65, #c1c7cd);--mat-sys-tertiary-container:light-dark(#dde3e9, #41474d);--mat-sys-tertiary-fixed:light-dark(#dde3e9, #dde3e9);--mat-sys-tertiary-fixed-dim:light-dark(#c1c7cd, #c1c7cd);--mat-sys-neutral-variant20:#2d3134;--mat-sys-neutral10:#1c1b1c}html{--mat-sys-level0:0px 0px 0px 0px rgba(0, 0, 0, .2), 0px 0px 0px 0px rgba(0, 0, 0, .14), 0px 0px 0px 0px rgba(0, 0, 0, .12)}html{--mat-sys-level1:0px 2px 1px -1px rgba(0, 0, 0, .2), 0px 1px 1px 0px rgba(0, 0, 0, .14), 0px 1px 3px 0px rgba(0, 0, 0, .12)}html{--mat-sys-level2:0px 3px 3px -2px rgba(0, 0, 0, .2), 0px 3px 4px 0px rgba(0, 0, 0, .14), 0px 1px 8px 0px rgba(0, 0, 0, .12)}html{--mat-sys-level3:0px 3px 5px -1px rgba(0, 0, 0, .2), 0px 6px 10px 0px rgba(0, 0, 0, .14), 0px 1px 18px 0px rgba(0, 0, 0, .12)}html{--mat-sys-level4:0px 5px 5px -3px rgba(0, 0, 0, .2), 0px 8px 10px 1px rgba(0, 0, 0, .14), 0px 3px 14px 2px rgba(0, 0, 0, .12)}html{--mat-sys-level5:0px 7px 8px -4px rgba(0, 0, 0, .2), 0px 12px 17px 2px rgba(0, 0, 0, .14), 0px 5px 22px 4px rgba(0, 0, 0, .12)}html{--mat-sys-corner-extra-large:28px;--mat-sys-corner-extra-large-top:28px 28px 0 0;--mat-sys-corner-extra-small:4px;--mat-sys-corner-extra-small-top:4px 4px 0 0;--mat-sys-corner-full:9999px;--mat-sys-corner-large:16px;--mat-sys-corner-large-end:0 16px 16px 0;--mat-sys-corner-large-start:16px 0 0 16px;--mat-sys-corner-large-top:16px 16px 0 0;--mat-sys-corner-medium:12px;--mat-sys-corner-none:0;--mat-sys-corner-small:8px}html{--mat-sys-dragged-state-layer-opacity:.16;--mat-sys-focus-state-layer-opacity:.12;--mat-sys-hover-state-layer-opacity:.08;--mat-sys-pressed-state-layer-opacity:.12}html{font-family:Google Sans,Helvetica Neue,sans-serif!important}body{height:100vh;margin:0}:root{--mat-sys-primary:black;--mdc-checkbox-selected-icon-color:white;--mat-sys-background:#131314;--mat-tab-header-active-label-text-color:#8AB4F8;--mat-tab-header-active-hover-label-text-color:#8AB4F8;--mat-tab-header-active-focus-label-text-color:#8AB4F8;--mat-tab-header-label-text-weight:500;--mdc-text-button-label-text-color:#89b4f8}:root{--mdc-dialog-container-color:#2b2b2f}:root{--mdc-dialog-subhead-color:white}:root{--mdc-circular-progress-active-indicator-color:#a8c7fa}:root{--mdc-circular-progress-size:80}</style><link rel="stylesheet" href="styles-4VDSPQ37.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="styles-4VDSPQ37.css"></noscript></head>
|
30
30
|
<body>
|
31
31
|
<app-root></app-root>
|
32
|
-
<script src="polyfills-FFHMD2TL.js" type="module"></script><script src="main-
|
32
|
+
<script src="polyfills-FFHMD2TL.js" type="module"></script><script src="main-SY2WYYGV.js" type="module"></script></body>
|
33
33
|
</html>
|