Skip to content

Commit

Permalink
Define processors and metadata as plugin toolset arguments (#448)
Browse files Browse the repository at this point in the history
  • Loading branch information
angrybayblade authored Aug 16, 2024
1 parent fb403af commit 21484af
Show file tree
Hide file tree
Showing 33 changed files with 98 additions and 39 deletions.
2 changes: 1 addition & 1 deletion python/composio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@
"action",
)

__version__ = "0.4.2"
__version__ = "0.4.3"
2 changes: 1 addition & 1 deletion python/dockerfiles/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ RUN /bin/python3 -m venv .composio/venv
RUN export PATH=$PATH:$(pwd)/.composio/venv/bin

# Install composio
RUN python -m pip install composio-core[all]==0.4.2 fastapi playwright uvicorn
RUN python -m pip install composio-core[all]==0.4.3 fastapi playwright uvicorn

# Install playwright deps
RUN playwright install-deps
Expand Down
2 changes: 1 addition & 1 deletion python/dockerfiles/Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ RUN export PATH=$PATH:$(pwd)/.composio/venv/bin

# Install composio for dependency caching
# Install composio
RUN python -m pip install composio-core[all]==0.4.2 fastapi playwright uvicorn
RUN python -m pip install composio-core[all]==0.4.3 fastapi playwright uvicorn

# Install playwright deps
RUN playwright install-deps
Expand Down
5 changes: 5 additions & 0 deletions python/plugins/autogen/composio_autogen/toolset.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from composio import Action, ActionType, AppType, TagType, WorkspaceConfigType
from composio.constants import DEFAULT_ENTITY_ID
from composio.tools import ComposioToolSet as BaseComposioToolSet
from composio.tools.toolset import MetadataType, ProcessorsType
from composio.utils.shared import get_signature_format_from_schema_params


Expand All @@ -27,6 +28,8 @@ def __init__(
output_in_file: bool = False,
workspace_config: t.Optional[WorkspaceConfigType] = None,
workspace_id: t.Optional[str] = None,
metadata: t.Optional[MetadataType] = None,
processors: t.Optional[ProcessorsType] = None,
) -> None:
"""
Initialize composio toolset.
Expand All @@ -46,6 +49,8 @@ def __init__(
output_in_file=output_in_file,
workspace_config=workspace_config,
workspace_id=workspace_id,
metadata=metadata,
processors=processors,
)
self.caller = caller
self.executor = executor
Expand Down
4 changes: 2 additions & 2 deletions python/plugins/autogen/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name="composio_autogen",
version="0.4.2",
version="0.4.3",
author="Sawradip",
author_email="[email protected]",
description="Use Composio to get an array of tools with your Autogen agent.",
Expand All @@ -22,6 +22,6 @@
"Operating System :: OS Independent",
],
python_requires=">=3.9,<4",
install_requires=["composio_core==0.4.2", "pyautogen>=0.2.19"],
install_requires=["composio_core==0.4.3", "pyautogen>=0.2.19"],
include_package_data=True,
)
9 changes: 7 additions & 2 deletions python/plugins/camel/composio_camel/toolset.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from composio.tools import ComposioToolSet as BaseComposioToolSet
from composio.tools.env.base import WorkspaceConfigType
from composio.tools.schema import OpenAISchema, SchemaType
from composio.tools.toolset import MetadataType, ProcessorsType


# pylint: enable=E0611
Expand Down Expand Up @@ -90,8 +91,10 @@ def __init__(
base_url: t.Optional[str] = None,
entity_id: str = DEFAULT_ENTITY_ID,
output_in_file: bool = False,
workspace_id: t.Optional[str] = None,
workspace_config: t.Optional[WorkspaceConfigType] = None,
workspace_id: t.Optional[str] = None,
metadata: t.Optional[MetadataType] = None,
processors: t.Optional[ProcessorsType] = None,
) -> None:
"""
Initialize composio toolset.
Expand All @@ -107,8 +110,10 @@ def __init__(
runtime="camel",
entity_id=entity_id,
output_in_file=output_in_file,
workspace_id=workspace_id,
workspace_config=workspace_config,
workspace_id=workspace_id,
metadata=metadata,
processors=processors,
)
self.schema = SchemaType.OPENAI

Expand Down
4 changes: 2 additions & 2 deletions python/plugins/camel/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name="composio_camel",
version="0.4.2",
version="0.4.3",
author="Sawradip",
author_email="[email protected]",
description="Use Composio to get an array of tools with your Claude LLMs.",
Expand All @@ -22,6 +22,6 @@
"Operating System :: OS Independent",
],
python_requires=">=3.9,<4",
install_requires=["composio_core==0.4.2", "camel-ai>=0.1.5.7"],
install_requires=["composio_core==0.4.3", "camel-ai>=0.1.5.7"],
include_package_data=True,
)
5 changes: 5 additions & 0 deletions python/plugins/claude/composio_claude/toolset.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from composio.constants import DEFAULT_ENTITY_ID
from composio.tools import ComposioToolSet as BaseComposioToolSet
from composio.tools.schema import ClaudeSchema, SchemaType
from composio.tools.toolset import MetadataType, ProcessorsType


class ComposioToolset(BaseComposioToolSet):
Expand Down Expand Up @@ -58,6 +59,8 @@ def __init__(
output_in_file: bool = False,
workspace_config: t.Optional[WorkspaceConfigType] = None,
workspace_id: t.Optional[str] = None,
metadata: t.Optional[MetadataType] = None,
processors: t.Optional[ProcessorsType] = None,
) -> None:
"""
Initialize composio toolset.
Expand All @@ -75,6 +78,8 @@ def __init__(
output_in_file=output_in_file,
workspace_config=workspace_config,
workspace_id=workspace_id,
metadata=metadata,
processors=processors,
)
self.schema = SchemaType.CLAUDE

Expand Down
4 changes: 2 additions & 2 deletions python/plugins/claude/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name="composio_claude",
version="0.4.2",
version="0.4.3",
author="Sawradip",
author_email="[email protected]",
description="Use Composio to get an array of tools with your Claude LLMs.",
Expand All @@ -22,6 +22,6 @@
"Operating System :: OS Independent",
],
python_requires=">=3.9,<4",
install_requires=["composio_openai==0.4.2", "anthropic>=0.25.7"],
install_requires=["composio_openai==0.4.3", "anthropic>=0.25.7"],
include_package_data=True,
)
4 changes: 2 additions & 2 deletions python/plugins/crew_ai/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name="composio_crewai",
version="0.4.2",
version="0.4.3",
author="Himanshu",
author_email="[email protected]",
description="Use Composio to get an array of tools with your CrewAI agent.",
Expand All @@ -22,6 +22,6 @@
"Operating System :: OS Independent",
],
python_requires=">=3.9,<4",
install_requires=["composio_langchain==0.4.2", "crewai"],
install_requires=["composio_langchain==0.4.3", "crewai"],
include_package_data=True,
)
5 changes: 5 additions & 0 deletions python/plugins/griptape/composio_griptape/toolset.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from composio import Action, ActionType, AppType, TagType, WorkspaceConfigType
from composio.constants import DEFAULT_ENTITY_ID
from composio.tools import ComposioToolSet as BaseComposioToolSet
from composio.tools.toolset import MetadataType, ProcessorsType
from composio.utils.shared import PYDANTIC_TYPE_TO_PYTHON_TYPE


Expand Down Expand Up @@ -51,6 +52,8 @@ def __init__(
output_in_file: bool = False,
workspace_config: t.Optional[WorkspaceConfigType] = None,
workspace_id: t.Optional[str] = None,
metadata: t.Optional[MetadataType] = None,
processors: t.Optional[ProcessorsType] = None,
) -> None:
"""
Initialize composio toolset.
Expand All @@ -68,6 +71,8 @@ def __init__(
output_in_file=output_in_file,
workspace_config=workspace_config,
workspace_id=workspace_id,
metadata=metadata,
processors=processors,
)

def _wrap_tool(
Expand Down
4 changes: 2 additions & 2 deletions python/plugins/griptape/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name="composio_griptape",
version="0.4.2",
version="0.4.3",
author="Sawradip",
author_email="[email protected]",
description="Use Composio to get an array of tools with your Griptape wokflow.",
Expand All @@ -22,6 +22,6 @@
"Operating System :: OS Independent",
],
python_requires=">=3.9,<4",
install_requires=["composio_core==0.4.2", "griptape>=0.24.2"],
install_requires=["composio_core==0.4.3", "griptape>=0.24.2"],
include_package_data=True,
)
5 changes: 5 additions & 0 deletions python/plugins/julep/composio_julep/toolset.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

from composio import Action, WorkspaceConfigType
from composio.constants import DEFAULT_ENTITY_ID
from composio.tools.toolset import MetadataType, ProcessorsType

from composio_openai import ComposioToolSet as BaseComposioToolSet

Expand All @@ -23,6 +24,8 @@ def __init__(
output_in_file: bool = False,
workspace_config: t.Optional[WorkspaceConfigType] = None,
workspace_id: t.Optional[str] = None,
metadata: t.Optional[MetadataType] = None,
processors: t.Optional[ProcessorsType] = None,
) -> None:
"""
Initialize composio toolset.
Expand All @@ -39,6 +42,8 @@ def __init__(
output_in_file=output_in_file,
workspace_config=workspace_config,
workspace_id=workspace_id,
metadata=metadata,
processors=processors,
)
self._runtime = "julep"

Expand Down
4 changes: 2 additions & 2 deletions python/plugins/julep/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name="composio_julep",
version="0.4.2",
version="0.4.3",
author="Sawradip",
author_email="[email protected]",
description="Use Composio to get an array of tools with your Julep wokflow.",
Expand All @@ -22,6 +22,6 @@
"Operating System :: OS Independent",
],
python_requires=">=3.9,<4",
install_requires=["composio_openai==0.4.2", "julep>=0.3.2"],
install_requires=["composio_openai==0.4.3", "julep>=0.3.2"],
include_package_data=True,
)
5 changes: 5 additions & 0 deletions python/plugins/langchain/composio_langchain/toolset.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from composio import Action, ActionType, AppType, TagType, WorkspaceConfigType
from composio.constants import DEFAULT_ENTITY_ID
from composio.tools import ComposioToolSet as BaseComposioToolSet
from composio.tools.toolset import MetadataType, ProcessorsType
from composio.utils.shared import (
get_signature_format_from_schema_params,
json_schema_to_model,
Expand Down Expand Up @@ -63,6 +64,8 @@ def __init__(
output_in_file: bool = False,
workspace_config: t.Optional[WorkspaceConfigType] = None,
workspace_id: t.Optional[str] = None,
metadata: t.Optional[MetadataType] = None,
processors: t.Optional[ProcessorsType] = None,
) -> None:
"""
Initialize composio toolset.
Expand All @@ -80,6 +83,8 @@ def __init__(
output_in_file=output_in_file,
workspace_config=workspace_config,
workspace_id=workspace_id,
metadata=metadata,
processors=processors,
)

def _wrap_action(
Expand Down
4 changes: 2 additions & 2 deletions python/plugins/langchain/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name="composio_langchain",
version="0.4.2",
version="0.4.3",
author="Karan",
author_email="[email protected]",
description="Use Composio to get an array of tools with your LangChain agent.",
Expand All @@ -27,7 +27,7 @@
"langchain-openai>=0.0.2.post1",
"pydantic>=2.6.4",
"langchainhub>=0.1.15",
"composio_core==0.4.2",
"composio_core==0.4.3",
],
include_package_data=True,
)
5 changes: 5 additions & 0 deletions python/plugins/langgraph/composio_langgraph/toolset.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from composio import WorkspaceConfigType
from composio.constants import DEFAULT_ENTITY_ID
from composio.tools.toolset import MetadataType, ProcessorsType

from composio_langchain import ComposioToolSet as BaseComposioToolSet

Expand Down Expand Up @@ -103,6 +104,8 @@ def __init__(
output_in_file: bool = False,
workspace_config: t.Optional[WorkspaceConfigType] = None,
workspace_id: t.Optional[str] = None,
metadata: t.Optional[MetadataType] = None,
processors: t.Optional[ProcessorsType] = None,
) -> None:
"""
Initialize composio toolset.
Expand All @@ -119,6 +122,8 @@ def __init__(
output_in_file=output_in_file,
workspace_config=workspace_config,
workspace_id=workspace_id,
metadata=metadata,
processors=processors,
)

self._runtime = "langgraph"
4 changes: 2 additions & 2 deletions python/plugins/langgraph/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name="composio_langgraph",
version="0.4.2",
version="0.4.3",
author="Sawradip",
author_email="[email protected]",
description="Use Composio to get array of tools with LnagGraph Agent Workflows",
Expand All @@ -23,7 +23,7 @@
],
python_requires=">=3.9,<4",
install_requires=[
"composio_langchain==0.4.2",
"composio_langchain==0.4.3",
"langgraph",
],
include_package_data=True,
Expand Down
5 changes: 5 additions & 0 deletions python/plugins/llamaindex/composio_llamaindex/toolset.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

from composio import Action, ActionType, AppType, TagType, WorkspaceConfigType
from composio.constants import DEFAULT_ENTITY_ID
from composio.tools.toolset import MetadataType, ProcessorsType
from composio.utils.shared import get_pydantic_signature_format_from_schema_params

from composio_langchain import ComposioToolSet as BaseComposioToolSet
Expand Down Expand Up @@ -60,6 +61,8 @@ def __init__(
entity_id: str = DEFAULT_ENTITY_ID,
workspace_config: t.Optional[WorkspaceConfigType] = None,
workspace_id: t.Optional[str] = None,
metadata: t.Optional[MetadataType] = None,
processors: t.Optional[ProcessorsType] = None,
) -> None:
"""
Initialize composio toolset.
Expand All @@ -74,6 +77,8 @@ def __init__(
entity_id=entity_id,
workspace_config=workspace_config,
workspace_id=workspace_id,
metadata=metadata,
processors=processors,
)
self._runtime = "llamaindex"

Expand Down
4 changes: 2 additions & 2 deletions python/plugins/llamaindex/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name="composio_llamaindex",
version="0.4.2",
version="0.4.3",
author="Sawradip",
author_email="[email protected]",
description="Use Composio to get an array of tools with your LlamaIndex agent.",
Expand All @@ -24,7 +24,7 @@
python_requires=">=3.9,<4",
install_requires=[
"llama_index>=0.10.43",
"composio_langchain==0.4.2",
"composio_langchain==0.4.3",
],
include_package_data=True,
)
Loading

0 comments on commit 21484af

Please sign in to comment.