composio-google-adk 1.0.0rc6__tar.gz
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.
- composio_google_adk-1.0.0rc6/PKG-INFO +21 -0
- composio_google_adk-1.0.0rc6/README.md +2 -0
- composio_google_adk-1.0.0rc6/composio_google_adk/__init__.py +3 -0
- composio_google_adk-1.0.0rc6/composio_google_adk/provider.py +64 -0
- composio_google_adk-1.0.0rc6/composio_google_adk/py.typed +0 -0
- composio_google_adk-1.0.0rc6/composio_google_adk.egg-info/PKG-INFO +21 -0
- composio_google_adk-1.0.0rc6/composio_google_adk.egg-info/SOURCES.txt +11 -0
- composio_google_adk-1.0.0rc6/composio_google_adk.egg-info/dependency_links.txt +1 -0
- composio_google_adk-1.0.0rc6/composio_google_adk.egg-info/requires.txt +2 -0
- composio_google_adk-1.0.0rc6/composio_google_adk.egg-info/top_level.txt +1 -0
- composio_google_adk-1.0.0rc6/pyproject.toml +21 -0
- composio_google_adk-1.0.0rc6/setup.cfg +4 -0
- composio_google_adk-1.0.0rc6/setup.py +28 -0
@@ -0,0 +1,21 @@
|
|
1
|
+
Metadata-Version: 2.4
|
2
|
+
Name: composio-google-adk
|
3
|
+
Version: 1.0.0rc6
|
4
|
+
Summary: Use Composio to get an array of tools with your Google AI Python Gemini model.
|
5
|
+
Home-page: https://github.com/ComposioHQ/composio
|
6
|
+
Author: Composio
|
7
|
+
Author-email: Composio <tech@composio.dev>
|
8
|
+
Project-URL: Homepage, https://github.com/ComposioHQ/composio
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
10
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
11
|
+
Classifier: Operating System :: OS Independent
|
12
|
+
Requires-Python: >=3.9,<4
|
13
|
+
Description-Content-Type: text/markdown
|
14
|
+
Requires-Dist: google-adk
|
15
|
+
Requires-Dist: composio
|
16
|
+
Dynamic: author
|
17
|
+
Dynamic: home-page
|
18
|
+
Dynamic: requires-python
|
19
|
+
|
20
|
+
# Composio Provider For Google ADK
|
21
|
+
|
@@ -0,0 +1,64 @@
|
|
1
|
+
import types
|
2
|
+
import typing as t
|
3
|
+
from inspect import Signature
|
4
|
+
|
5
|
+
from google.adk.tools import FunctionTool
|
6
|
+
|
7
|
+
from composio.client.types import Tool
|
8
|
+
from composio.core.provider import AgenticProvider
|
9
|
+
from composio.core.provider.agentic import AgenticProviderExecuteFn
|
10
|
+
from composio.utils.openapi import function_signature_from_jsonschema
|
11
|
+
|
12
|
+
|
13
|
+
class GoogleAdkProvider(
|
14
|
+
AgenticProvider[FunctionTool, list[FunctionTool]], name="gemini"
|
15
|
+
):
|
16
|
+
"""
|
17
|
+
Composio toolset for Google ADK framework.
|
18
|
+
"""
|
19
|
+
|
20
|
+
def wrap_tool(
|
21
|
+
self,
|
22
|
+
tool: Tool,
|
23
|
+
execute_tool: AgenticProviderExecuteFn,
|
24
|
+
) -> FunctionTool:
|
25
|
+
"""Wraps composio tool as Google Genai SDK compatible function calling object."""
|
26
|
+
|
27
|
+
docstring = tool.description
|
28
|
+
docstring += "\nArgs:"
|
29
|
+
for _param, _schema in tool.input_parameters["properties"].items(): # type: ignore
|
30
|
+
docstring += "\n "
|
31
|
+
docstring += _param + ": " + _schema.get("description", _param.title())
|
32
|
+
|
33
|
+
docstring += "\nReturns:"
|
34
|
+
docstring += "\n A dictionary containing response from the action"
|
35
|
+
|
36
|
+
def _execute(**kwargs: t.Any) -> t.Dict:
|
37
|
+
return execute_tool(slug=tool.slug, arguments=kwargs)
|
38
|
+
|
39
|
+
function = types.FunctionType(
|
40
|
+
code=_execute.__code__,
|
41
|
+
name=tool.slug,
|
42
|
+
globals=globals(),
|
43
|
+
closure=_execute.__closure__,
|
44
|
+
)
|
45
|
+
parameters = function_signature_from_jsonschema(
|
46
|
+
schema=tool.input_parameters,
|
47
|
+
skip_default=True,
|
48
|
+
)
|
49
|
+
setattr(function, "__signature__", Signature(parameters=parameters))
|
50
|
+
setattr(
|
51
|
+
function,
|
52
|
+
"__annotations__",
|
53
|
+
{p.name: p.annotation for p in parameters} | {"return": dict},
|
54
|
+
)
|
55
|
+
function.__doc__ = docstring
|
56
|
+
return FunctionTool(function)
|
57
|
+
|
58
|
+
def wrap_tools(
|
59
|
+
self,
|
60
|
+
tools: t.Sequence[Tool],
|
61
|
+
execute_tool: AgenticProviderExecuteFn,
|
62
|
+
) -> list[FunctionTool]:
|
63
|
+
"""Get composio tools wrapped as Google Genai SDK compatible function calling object."""
|
64
|
+
return [self.wrap_tool(tool, execute_tool) for tool in tools]
|
File without changes
|
@@ -0,0 +1,21 @@
|
|
1
|
+
Metadata-Version: 2.4
|
2
|
+
Name: composio-google-adk
|
3
|
+
Version: 1.0.0rc6
|
4
|
+
Summary: Use Composio to get an array of tools with your Google AI Python Gemini model.
|
5
|
+
Home-page: https://github.com/ComposioHQ/composio
|
6
|
+
Author: Composio
|
7
|
+
Author-email: Composio <tech@composio.dev>
|
8
|
+
Project-URL: Homepage, https://github.com/ComposioHQ/composio
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
10
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
11
|
+
Classifier: Operating System :: OS Independent
|
12
|
+
Requires-Python: >=3.9,<4
|
13
|
+
Description-Content-Type: text/markdown
|
14
|
+
Requires-Dist: google-adk
|
15
|
+
Requires-Dist: composio
|
16
|
+
Dynamic: author
|
17
|
+
Dynamic: home-page
|
18
|
+
Dynamic: requires-python
|
19
|
+
|
20
|
+
# Composio Provider For Google ADK
|
21
|
+
|
@@ -0,0 +1,11 @@
|
|
1
|
+
README.md
|
2
|
+
pyproject.toml
|
3
|
+
setup.py
|
4
|
+
composio_google_adk/__init__.py
|
5
|
+
composio_google_adk/provider.py
|
6
|
+
composio_google_adk/py.typed
|
7
|
+
composio_google_adk.egg-info/PKG-INFO
|
8
|
+
composio_google_adk.egg-info/SOURCES.txt
|
9
|
+
composio_google_adk.egg-info/dependency_links.txt
|
10
|
+
composio_google_adk.egg-info/requires.txt
|
11
|
+
composio_google_adk.egg-info/top_level.txt
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
composio_google_adk
|
@@ -0,0 +1,21 @@
|
|
1
|
+
[project]
|
2
|
+
name = "composio-google-adk"
|
3
|
+
version = "1.0.0-rc6"
|
4
|
+
description = "Use Composio to get an array of tools with your Google AI Python Gemini model."
|
5
|
+
readme = "README.md"
|
6
|
+
requires-python = ">=3.9,<4"
|
7
|
+
authors = [
|
8
|
+
{ name = "Composio", email = "tech@composio.dev" }
|
9
|
+
]
|
10
|
+
classifiers = [
|
11
|
+
"Programming Language :: Python :: 3",
|
12
|
+
"License :: OSI Approved :: Apache Software License",
|
13
|
+
"Operating System :: OS Independent",
|
14
|
+
]
|
15
|
+
dependencies = [
|
16
|
+
"google-adk",
|
17
|
+
"composio",
|
18
|
+
]
|
19
|
+
|
20
|
+
[project.urls]
|
21
|
+
Homepage = "https://github.com/ComposioHQ/composio"
|
@@ -0,0 +1,28 @@
|
|
1
|
+
"""
|
2
|
+
Setup configuration for Composio Google AI Python Gemini plugin
|
3
|
+
"""
|
4
|
+
|
5
|
+
from pathlib import Path
|
6
|
+
|
7
|
+
from setuptools import setup
|
8
|
+
|
9
|
+
setup(
|
10
|
+
name="composio_google_adk",
|
11
|
+
version="1.0.0-rc6",
|
12
|
+
author="Composio",
|
13
|
+
author_email="tech@composio.dev",
|
14
|
+
description="Use Composio to get an array of tools with your Google AI Python Gemini model.",
|
15
|
+
long_description=(Path(__file__).parent / "README.md").read_text(encoding="utf-8"),
|
16
|
+
long_description_content_type="text/markdown",
|
17
|
+
url="https://github.com/ComposioHQ/composio",
|
18
|
+
classifiers=[
|
19
|
+
"Programming Language :: Python :: 3",
|
20
|
+
"License :: OSI Approved :: Apache Software License",
|
21
|
+
"Operating System :: OS Independent",
|
22
|
+
],
|
23
|
+
python_requires=">=3.9,<4",
|
24
|
+
install_requires=[
|
25
|
+
"google-adk",
|
26
|
+
],
|
27
|
+
include_package_data=True,
|
28
|
+
)
|