diff --git a/python/composio/__version__.py b/python/composio/__version__.py index e3ec1ef2593..73f72eb7957 100644 --- a/python/composio/__version__.py +++ b/python/composio/__version__.py @@ -1 +1 @@ -__version__ = "0.5.51" +__version__ = "0.5.52-rc.1" diff --git a/python/composio/client/collections.py b/python/composio/client/collections.py index 0a4ff66d453..02f0e8344d8 100644 --- a/python/composio/client/collections.py +++ b/python/composio/client/collections.py @@ -1095,7 +1095,20 @@ def get( # type: ignore app :return: List of actions """ - actions = t.cast(t.List[Action], [Action(action) for action in actions or []]) + + def is_action(obj): + try: + return hasattr(obj, "app") + except AttributeError: + return False + + actions = t.cast( + t.List[Action], + [ + action if is_action(action) else Action(action) + for action in actions or [] + ], + ) apps = t.cast(t.List[App], [App(app) for app in apps or []]) tags = t.cast(t.List[Tag], [Tag(tag) for tag in tags or []]) diff --git a/python/composio/tools/env/host/workspace.py b/python/composio/tools/env/host/workspace.py index 5e321e39256..a6627c2ac28 100644 --- a/python/composio/tools/env/host/workspace.py +++ b/python/composio/tools/env/host/workspace.py @@ -171,7 +171,7 @@ def check_for_missing_dependencies( missing[app.slug].add(dependency) actions = actions or [] - for action in map(Action, actions): + for action in [Action(a) if not isinstance(a, Action) else a for a in actions]: if not action.is_local or action.is_runtime: continue diff --git a/python/composio/tools/toolset.py b/python/composio/tools/toolset.py index c8cb70e4cbf..74b0d60038a 100644 --- a/python/composio/tools/toolset.py +++ b/python/composio/tools/toolset.py @@ -744,7 +744,7 @@ def execute_action( :param connected_account_id: Connection ID for executing the remote action :return: Output object from the function call """ - action = Action(action) + action = load_action(self.client, action) params = self._serialize_execute_params(param=params) if processors is not None: self._merge_processors(processors) @@ -863,6 +863,8 @@ def validate_tools( # NOTE: This an experimental, can convert to decorator for more convinience if not apps and not actions and not tags: return + if actions: + actions = [load_action(self.client, action) for action in actions] self.workspace.check_for_missing_dependencies( apps=apps, actions=actions, @@ -884,7 +886,7 @@ def get_action_schemas( actions = t.cast( t.List[Action], [ - Action(action) + load_action(self.client, action) for action in actions or [] if action not in runtime_actions ], diff --git a/python/plugins/autogen/setup.py b/python/plugins/autogen/setup.py index 4d4ea309a4c..dd618755ea1 100644 --- a/python/plugins/autogen/setup.py +++ b/python/plugins/autogen/setup.py @@ -9,7 +9,7 @@ setup( name="composio_autogen", - version="0.5.51", + version="0.5.52-rc.1", author="Sawradip", author_email="sawradip@composio.dev", description="Use Composio to get an array of tools with your Autogen agent.", @@ -23,7 +23,7 @@ ], python_requires=">=3.9,<4", install_requires=[ - "composio_core>=0.5.50,<=0.5.51", + "composio_core>=0.5.50,<=0.5.52-rc.1", "pyautogen>=0.2.19", "flaml==2.2.0", ], diff --git a/python/plugins/camel/setup.py b/python/plugins/camel/setup.py index a47bd8c694c..c315a622a96 100644 --- a/python/plugins/camel/setup.py +++ b/python/plugins/camel/setup.py @@ -9,7 +9,7 @@ setup( name="composio_camel", - version="0.5.51", + version="0.5.52-rc.1", author="Sawradip", author_email="sawradip@composio.dev", description="Use Composio to get an array of tools with your Claude LLMs.", @@ -23,7 +23,7 @@ ], python_requires=">=3.9,<4", install_requires=[ - "composio_core>=0.5.50,<=0.5.51", + "composio_core>=0.5.50,<=0.5.52-rc.1", "camel-ai>=0.1.5.7,<=0.2.2", "pillow", ], diff --git a/python/plugins/claude/setup.py b/python/plugins/claude/setup.py index 83abefaf161..2b7019f3f1c 100644 --- a/python/plugins/claude/setup.py +++ b/python/plugins/claude/setup.py @@ -9,7 +9,7 @@ setup( name="composio_claude", - version="0.5.51", + version="0.5.52-rc.1", author="Sawradip", author_email="sawradip@composio.dev", description="Use Composio to get an array of tools with your Claude LLMs.", @@ -22,6 +22,6 @@ "Operating System :: OS Independent", ], python_requires=">=3.9,<4", - install_requires=["composio_openai>=0.5.50,<=0.5.51", "anthropic>=0.25.7"], + install_requires=["composio_openai>=0.5.50,<=0.5.52-rc.1", "anthropic>=0.25.7"], include_package_data=True, ) diff --git a/python/plugins/crew_ai/setup.py b/python/plugins/crew_ai/setup.py index 18be56aa91c..aedaabe29b4 100644 --- a/python/plugins/crew_ai/setup.py +++ b/python/plugins/crew_ai/setup.py @@ -9,7 +9,7 @@ setup( name="composio_crewai", - version="0.5.51", + version="0.5.52-rc.1", author="Himanshu", author_email="himanshu@composio.dev", description="Use Composio to get an array of tools with your CrewAI agent.", @@ -23,7 +23,7 @@ ], python_requires=">=3.9,<4", install_requires=[ - "composio_langchain>=0.5.50,<=0.5.51", + "composio_langchain>=0.5.50,<=0.5.52-rc.1", "crewai>=0.51.0,<=0.75.0", ], include_package_data=True, diff --git a/python/plugins/google/setup.py b/python/plugins/google/setup.py index 4ef9bfd8d41..19c5b11cb90 100644 --- a/python/plugins/google/setup.py +++ b/python/plugins/google/setup.py @@ -9,7 +9,7 @@ setup( name="composio_google", - version="0.5.51", + version="0.5.52-rc.1", author="Assistant", author_email="karan@composio.dev", description="Use Composio to get an array of tools with your Google AI Python Gemini model.", @@ -23,7 +23,7 @@ ], python_requires=">=3.9,<4", install_requires=[ - "composio_core>=0.5.50,<=0.5.51", + "composio_core>=0.5.50,<=0.5.52-rc.1", "google-cloud-aiplatform>=1.38.0", ], include_package_data=True, diff --git a/python/plugins/griptape/setup.py b/python/plugins/griptape/setup.py index ce20449d59e..6bbed19e836 100644 --- a/python/plugins/griptape/setup.py +++ b/python/plugins/griptape/setup.py @@ -9,7 +9,7 @@ setup( name="composio_griptape", - version="0.5.51", + version="0.5.52-rc.1", author="Sawradip", author_email="sawradip@composio.dev", description="Use Composio to get an array of tools with your Griptape wokflow.", @@ -22,6 +22,6 @@ "Operating System :: OS Independent", ], python_requires=">=3.9,<4", - install_requires=["composio_core>=0.5.50,<=0.5.51", "griptape>=0.24.2"], + install_requires=["composio_core>=0.5.50,<=0.5.52-rc.1", "griptape>=0.24.2"], include_package_data=True, ) diff --git a/python/plugins/julep/setup.py b/python/plugins/julep/setup.py index 0b71b057534..8d5cb7950f8 100644 --- a/python/plugins/julep/setup.py +++ b/python/plugins/julep/setup.py @@ -9,7 +9,7 @@ setup( name="composio_julep", - version="0.5.51", + version="0.5.52-rc.1", author="Sawradip", author_email="sawradip@composio.dev", description="Use Composio to get an array of tools with your Julep wokflow.", @@ -22,6 +22,6 @@ "Operating System :: OS Independent", ], python_requires=">=3.9,<4", - install_requires=["composio_openai>=0.5.50,<=0.5.51", "julep>=0.3.2"], + install_requires=["composio_openai>=0.5.50,<=0.5.52-rc.1", "julep>=0.3.2"], include_package_data=True, ) diff --git a/python/plugins/langchain/composio_langchain/toolset.py b/python/plugins/langchain/composio_langchain/toolset.py index b8dd4ef4672..c01b55ad18b 100644 --- a/python/plugins/langchain/composio_langchain/toolset.py +++ b/python/plugins/langchain/composio_langchain/toolset.py @@ -7,7 +7,7 @@ import typing_extensions as te from langchain_core.tools import StructuredTool as BaseStructuredTool -from composio import Action, ActionType, AppType, TagType +from composio import ActionType, AppType, TagType from composio.tools import ComposioToolSet as BaseComposioToolSet from composio.tools.toolset import ProcessorsType from composio.utils.pydantic import parse_pydantic_error @@ -82,7 +82,7 @@ def function(**kwargs: t.Any) -> t.Dict: """Wrapper function for composio action.""" self.logger.debug(f"Executing action: {action} with params: {kwargs}") return self.execute_action( - action=Action(value=action), + action=action, params=kwargs, entity_id=entity_id or self.entity_id, ) diff --git a/python/plugins/langchain/setup.py b/python/plugins/langchain/setup.py index f572ac7cf6a..02839bdca55 100644 --- a/python/plugins/langchain/setup.py +++ b/python/plugins/langchain/setup.py @@ -9,7 +9,7 @@ setup( name="composio_langchain", - version="0.5.51", + version="0.5.52-rc.1", author="Karan", author_email="karan@composio.dev", description="Use Composio to get an array of tools with your LangChain agent.", @@ -27,7 +27,7 @@ "langchain-openai>=0.0.2.post1", "pydantic>=2.6.4", "langchainhub>=0.1.15", - "composio_core>=0.5.50,<=0.5.51", + "composio_core>=0.5.50,<=0.5.52-rc.1", ], include_package_data=True, ) diff --git a/python/plugins/langgraph/setup.py b/python/plugins/langgraph/setup.py index 0ba1184f139..346043db582 100644 --- a/python/plugins/langgraph/setup.py +++ b/python/plugins/langgraph/setup.py @@ -9,7 +9,7 @@ setup( name="composio_langgraph", - version="0.5.51", + version="0.5.52-rc.1", author="Sawradip", author_email="sawradip@composio.dev", description="Use Composio to get array of tools with LnagGraph Agent Workflows", @@ -23,7 +23,7 @@ ], python_requires=">=3.9,<4", install_requires=[ - "composio_langchain>=0.5.50,<=0.5.51", + "composio_langchain>=0.5.50,<=0.5.52-rc.1", "langgraph", ], include_package_data=True, diff --git a/python/plugins/llamaindex/setup.py b/python/plugins/llamaindex/setup.py index 1588b63f142..0a51178225b 100644 --- a/python/plugins/llamaindex/setup.py +++ b/python/plugins/llamaindex/setup.py @@ -9,7 +9,7 @@ setup( name="composio_llamaindex", - version="0.5.51", + version="0.5.52-rc.1", author="Sawradip", author_email="sawradip@composio.dev", description="Use Composio to get an array of tools with your LlamaIndex agent.", @@ -24,7 +24,7 @@ python_requires=">=3.9,<4", install_requires=[ "llama_index>=0.10.43", - "composio_core>=0.5.50,<=0.5.51", + "composio_core>=0.5.50,<=0.5.52-rc.1", ], include_package_data=True, ) diff --git a/python/plugins/lyzr/setup.py b/python/plugins/lyzr/setup.py index e654a7c6a02..2c211855e0c 100644 --- a/python/plugins/lyzr/setup.py +++ b/python/plugins/lyzr/setup.py @@ -9,7 +9,7 @@ setup( name="composio_lyzr", - version="0.5.51", + version="0.5.52-rc.1", author="Sawradip", author_email="sawradip@composio.dev", description="Use Composio to get an array of tools with your Lyzr workflow.", @@ -25,7 +25,7 @@ install_requires=[ "lyzr-automata>=0.1.3", "pydantic>=2.6.4", - "composio_core>=0.5.50,<=0.5.51", + "composio_core>=0.5.50,<=0.5.52-rc.1", "langchain>=0.1.0", ], include_package_data=True, diff --git a/python/plugins/openai/composio_openai/toolset.py b/python/plugins/openai/composio_openai/toolset.py index 08d56f7fd05..6af50469b5a 100644 --- a/python/plugins/openai/composio_openai/toolset.py +++ b/python/plugins/openai/composio_openai/toolset.py @@ -16,7 +16,7 @@ ) from openai.types.chat.chat_completion_tool_param import ChatCompletionToolParam -from composio import Action, ActionType, AppType, TagType +from composio import ActionType, AppType, TagType from composio.constants import DEFAULT_ENTITY_ID from composio.tools import ComposioToolSet as BaseComposioToolSet from composio.tools.schema import OpenAISchema, SchemaType @@ -176,7 +176,7 @@ def execute_tool_call( :return: Object containing output data from the tool call. """ return self.execute_action( - action=Action(value=tool_call.function.name), + action=tool_call.function.name, params=json.loads(tool_call.function.arguments), entity_id=entity_id or self.entity_id, ) diff --git a/python/plugins/openai/setup.py b/python/plugins/openai/setup.py index e13631a9b78..e5693118bab 100644 --- a/python/plugins/openai/setup.py +++ b/python/plugins/openai/setup.py @@ -9,7 +9,7 @@ setup( name="composio_openai", - version="0.5.51", + version="0.5.52-rc.1", author="Sawradip", author_email="sawradip@composio.dev", description="Use Composio to get an array of tools with your OpenAI Function Call.", @@ -22,6 +22,6 @@ "Operating System :: OS Independent", ], python_requires=">=3.9,<4", - install_requires=["composio_core>=0.5.50,<=0.5.51", "openai"], + install_requires=["composio_core>=0.5.50,<=0.5.52-rc.1", "openai"], include_package_data=True, ) diff --git a/python/plugins/phidata/setup.py b/python/plugins/phidata/setup.py index 181f72b3bc4..e53802286c1 100644 --- a/python/plugins/phidata/setup.py +++ b/python/plugins/phidata/setup.py @@ -9,7 +9,7 @@ setup( name="composio_phidata", - version="0.5.51", + version="0.5.52-rc.1", author="Sawradip", author_email="sawradip@composio.dev", description="Use Composio to get an array of tools with your Phidata Plugin.", @@ -23,8 +23,8 @@ ], python_requires=">=3.9,<4", install_requires=[ - "composio_core>=0.5.50,<=0.5.51", - "composio_openai>=0.5.50,<=0.5.51", + "composio_core>=0.5.50,<=0.5.52-rc.1", + "composio_openai>=0.5.50,<=0.5.52-rc.1", "phidata", ], include_package_data=True, diff --git a/python/plugins/praisonai/setup.py b/python/plugins/praisonai/setup.py index 1f32aaf4b08..69d4b2c48e7 100644 --- a/python/plugins/praisonai/setup.py +++ b/python/plugins/praisonai/setup.py @@ -9,7 +9,7 @@ setup( name="composio_praisonai", - version="0.5.51", + version="0.5.52-rc.1", author="Sawradip", author_email="sawradip@composio.dev", description="Use Composio Tools to enhance your PraisonAI agents capabilities.", @@ -22,6 +22,6 @@ "Operating System :: OS Independent", ], python_requires=">=3.9", - install_requires=["composio_core>=0.5.50,<=0.5.51", "PraisonAI>=0.0.2"], + install_requires=["composio_core>=0.5.50,<=0.5.52-rc.1", "PraisonAI>=0.0.2"], include_package_data=True, ) diff --git a/python/setup.py b/python/setup.py index 57b59212960..5383016a7ff 100644 --- a/python/setup.py +++ b/python/setup.py @@ -90,7 +90,7 @@ def scan_for_package_data( setup( name="composio_core", - version="0.5.51", + version="0.5.52-rc.1", author="Utkarsh", author_email="utkarsh@composio.dev", description="Core package to act as a bridge between composio platform and other services.", diff --git a/python/swe/setup.py b/python/swe/setup.py index d5754969c2d..3ccd2e968b6 100644 --- a/python/swe/setup.py +++ b/python/swe/setup.py @@ -35,7 +35,7 @@ def scan_for_package_data( setup( name="swekit", - version="0.2.49", + version="0.2.50-rc.1", author="Shubhra", author_email="shubhra@composio.dev", description="Tools for running a SWE agent using Composio platform", @@ -66,7 +66,7 @@ def scan_for_package_data( "swebench==2.1.0", "datasets>=2.20.0", "gitpython>=3.1.43", - "composio_core>=0.5.50,<=0.5.51", + "composio_core>=0.5.50,<=0.5.52-rc.1", "unidiff==0.7.5", "tqdm==4.66.4", "rich", @@ -75,7 +75,7 @@ def scan_for_package_data( "langgraph": [ "langchain-aws==0.1.17", "langgraph>=0.2.16", - "composio_langgraph>=0.5.50,<=0.5.51", + "composio_langgraph>=0.5.50,<=0.5.52-rc.1", "python-dotenv==1.0.1", ] },