refactor: replace get_actions call with get_tools in Composio Component (#3684)
* refactor: update deprecated call to get_actions * Update composio-langchain dependency to version 0.5.13 in pyproject.toml * Downgrade `composio-langchain` dependency to version `0.5.9` in `pyproject.toml` * Add missing import for CustomComponent in test_custom_component.py
This commit is contained in:
parent
addadeb5cb
commit
aaaf6f3784
4 changed files with 30 additions and 56 deletions
81
poetry.lock
generated
81
poetry.lock
generated
|
|
@ -1,17 +1,5 @@
|
|||
# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand.
|
||||
|
||||
[[package]]
|
||||
name = "aenum"
|
||||
version = "3.1.15"
|
||||
description = "Advanced Enumerations (compatible with Python's stdlib Enum), NamedTuples, and NamedConstants"
|
||||
optional = false
|
||||
python-versions = "*"
|
||||
files = [
|
||||
{file = "aenum-3.1.15-py2-none-any.whl", hash = "sha256:27b1710b9d084de6e2e695dab78fe9f269de924b51ae2850170ee7e1ca6288a5"},
|
||||
{file = "aenum-3.1.15-py3-none-any.whl", hash = "sha256:e0dfaeea4c2bd362144b87377e2c61d91958c5ed0b4daf89cb6f45ae23af6288"},
|
||||
{file = "aenum-3.1.15.tar.gz", hash = "sha256:8cbd76cd18c4f870ff39b24284d3ea028fbe8731a58df3aa581e434c575b9559"},
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "aiofiles"
|
||||
version = "24.1.0"
|
||||
|
|
@ -409,22 +397,22 @@ anyio = ">=3.4.0,<5.0"
|
|||
|
||||
[[package]]
|
||||
name = "attrs"
|
||||
version = "24.2.0"
|
||||
version = "23.2.0"
|
||||
description = "Classes Without Boilerplate"
|
||||
optional = false
|
||||
python-versions = ">=3.7"
|
||||
files = [
|
||||
{file = "attrs-24.2.0-py3-none-any.whl", hash = "sha256:81921eb96de3191c8258c199618104dd27ac608d9366f5e35d011eae1867ede2"},
|
||||
{file = "attrs-24.2.0.tar.gz", hash = "sha256:5cfb1b9148b5b086569baec03f20d7b6bf3bcacc9a42bebf87ffaaca362f6346"},
|
||||
{file = "attrs-23.2.0-py3-none-any.whl", hash = "sha256:99b87a485a5820b23b879f04c2305b44b951b502fd64be915879d77a7e8fc6f1"},
|
||||
{file = "attrs-23.2.0.tar.gz", hash = "sha256:935dc3b529c262f6cf76e50877d35a4bd3c1de194fd41f47a2b7ae8f19971f30"},
|
||||
]
|
||||
|
||||
[package.extras]
|
||||
benchmark = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-codspeed", "pytest-mypy-plugins", "pytest-xdist[psutil]"]
|
||||
cov = ["cloudpickle", "coverage[toml] (>=5.3)", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"]
|
||||
dev = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pre-commit", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"]
|
||||
docs = ["cogapp", "furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier (<24.7)"]
|
||||
tests = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"]
|
||||
tests-mypy = ["mypy (>=1.11.1)", "pytest-mypy-plugins"]
|
||||
cov = ["attrs[tests]", "coverage[toml] (>=5.3)"]
|
||||
dev = ["attrs[tests]", "pre-commit"]
|
||||
docs = ["furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier", "zope-interface"]
|
||||
tests = ["attrs[tests-no-zope]", "zope-interface"]
|
||||
tests-mypy = ["mypy (>=1.6)", "pytest-mypy-plugins"]
|
||||
tests-no-zope = ["attrs[tests-mypy]", "cloudpickle", "hypothesis", "pympler", "pytest (>=4.3.0)", "pytest-xdist[psutil]"]
|
||||
|
||||
[[package]]
|
||||
name = "authlib"
|
||||
|
|
@ -2083,25 +2071,23 @@ files = [
|
|||
|
||||
[[package]]
|
||||
name = "e2b"
|
||||
version = "0.17.1"
|
||||
version = "0.17.2a52"
|
||||
description = "E2B SDK that give agents cloud environments"
|
||||
optional = false
|
||||
python-versions = "<4.0,>=3.8"
|
||||
files = [
|
||||
{file = "e2b-0.17.1-py3-none-any.whl", hash = "sha256:c0698fd03b639f4dd88eed167a98af4d450668c0ae9805122a98f62f36f2491f"},
|
||||
{file = "e2b-0.17.1.tar.gz", hash = "sha256:9e69a059cb73334bac7db189287552af9321fb3ac8ced52557907e10c4310733"},
|
||||
{file = "e2b-0.17.2a52-py3-none-any.whl", hash = "sha256:e15c585b0fc266fa23acc0826bc6869d24d69effb2b59e951ea3f77bd4be9b8c"},
|
||||
{file = "e2b-0.17.2a52.tar.gz", hash = "sha256:63c8b90b2d5208e0178e0ab352d82bb19d91d0796a9a39410cc4b2f43b996343"},
|
||||
]
|
||||
|
||||
[package.dependencies]
|
||||
aenum = ">=3.1.11"
|
||||
aiohttp = ">=3.8.4"
|
||||
jsonrpcclient = ">=4.0.3"
|
||||
pydantic = "*"
|
||||
attrs = ">=23.2.0,<24.0.0"
|
||||
httpcore = ">=1.0.5,<2.0.0"
|
||||
httpx = ">=0.27.0,<0.28.0"
|
||||
packaging = ">=24.1,<25.0"
|
||||
protobuf = ">=3.20.0,<6.0.0"
|
||||
python-dateutil = ">=2.8.2"
|
||||
requests = ">=2.31.0"
|
||||
typing-extensions = ">=4.8.0"
|
||||
urllib3 = ">=1.25.3"
|
||||
websockets = ">=11.0.3"
|
||||
typing-extensions = ">=4.12.2,<5.0.0"
|
||||
|
||||
[[package]]
|
||||
name = "e2b-code-interpreter"
|
||||
|
|
@ -4434,19 +4420,6 @@ files = [
|
|||
{file = "jsonref-1.1.0.tar.gz", hash = "sha256:32fe8e1d85af0fdefbebce950af85590b22b60f9e95443176adbde4e1ecea552"},
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "jsonrpcclient"
|
||||
version = "4.0.3"
|
||||
description = "Send JSON-RPC requests"
|
||||
optional = false
|
||||
python-versions = ">=3.6"
|
||||
files = [
|
||||
{file = "jsonrpcclient-4.0.3-py3-none-any.whl", hash = "sha256:3cbb9e27e1be29821becf135ea183144a836215422727e1ffe5056a49a670f0d"},
|
||||
]
|
||||
|
||||
[package.extras]
|
||||
qa = ["pytest", "pytest-cov", "tox"]
|
||||
|
||||
[[package]]
|
||||
name = "jsonschema"
|
||||
version = "4.23.0"
|
||||
|
|
@ -5149,13 +5122,13 @@ url = "src/backend/base"
|
|||
|
||||
[[package]]
|
||||
name = "langfuse"
|
||||
version = "2.45.0"
|
||||
version = "2.46.0"
|
||||
description = "A client library for accessing langfuse"
|
||||
optional = false
|
||||
python-versions = "<4.0,>=3.8.1"
|
||||
files = [
|
||||
{file = "langfuse-2.45.0-py3-none-any.whl", hash = "sha256:b2202846740bf4f7546d6ff692e1e2edb7393728ea87a7d8d98b88524ad8436d"},
|
||||
{file = "langfuse-2.45.0.tar.gz", hash = "sha256:0971449576038dcc86373e8310bee6a6ab63715bdd0ca9c537c40275e6c04e1b"},
|
||||
{file = "langfuse-2.46.0-py3-none-any.whl", hash = "sha256:a1ddd873629b5a0694a548203939b01d0be69e4cf39291791fb3db5d5e646a89"},
|
||||
{file = "langfuse-2.46.0.tar.gz", hash = "sha256:d8b348c1bc9b24c491c66b4674dba9f801a81377c96a0485831aac9f3be15c19"},
|
||||
]
|
||||
|
||||
[package.dependencies]
|
||||
|
|
@ -5163,7 +5136,7 @@ anyio = ">=4.4.0,<5.0.0"
|
|||
backoff = ">=1.10.0"
|
||||
httpx = ">=0.15.4,<1.0"
|
||||
idna = ">=3.7,<4.0"
|
||||
packaging = ">=23.2,<24.0"
|
||||
packaging = ">=24.1,<25.0"
|
||||
pydantic = ">=1.10.7,<3.0"
|
||||
wrapt = ">=1.14,<2.0"
|
||||
|
||||
|
|
@ -6809,13 +6782,13 @@ files = [
|
|||
|
||||
[[package]]
|
||||
name = "packaging"
|
||||
version = "23.2"
|
||||
version = "24.1"
|
||||
description = "Core utilities for Python packages"
|
||||
optional = false
|
||||
python-versions = ">=3.7"
|
||||
python-versions = ">=3.8"
|
||||
files = [
|
||||
{file = "packaging-23.2-py3-none-any.whl", hash = "sha256:8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7"},
|
||||
{file = "packaging-23.2.tar.gz", hash = "sha256:048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5"},
|
||||
{file = "packaging-24.1-py3-none-any.whl", hash = "sha256:5b8f2217dbdbd2f7f384c41c628544e6d52f2d0f53c6d0c3ea61aa5d1d7ff124"},
|
||||
{file = "packaging-24.1.tar.gz", hash = "sha256:026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002"},
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -12113,4 +12086,4 @@ local = ["ctransformers", "llama-cpp-python", "sentence-transformers"]
|
|||
[metadata]
|
||||
lock-version = "2.0"
|
||||
python-versions = ">=3.10,<3.13"
|
||||
content-hash = "5d520ff9f32b297bc10c0823992bfddbe240d2e5d38bb94e2c48fd110b909663"
|
||||
content-hash = "df05cdbe292ea7c326e72981177013a73f8a23287722e854398bbf15c2e57443"
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ yfinance = "^0.2.40"
|
|||
langchain-google-community = "1.0.7"
|
||||
wolframalpha = "^5.1.3"
|
||||
astra-assistants = "^2.1.0.10"
|
||||
composio-langchain = "^0.5.8"
|
||||
composio-langchain = "0.5.9"
|
||||
spider-client = "^0.0.27"
|
||||
nltk = "^3.9.1"
|
||||
bson = "^0.5.10"
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ class ComposioAPIComponent(LCToolComponent):
|
|||
|
||||
def build_tool(self) -> Sequence[Tool]:
|
||||
composio_toolset = self._build_wrapper()
|
||||
composio_tools = composio_toolset.get_actions(actions=self.action_names)
|
||||
composio_tools = composio_toolset.get_tools(actions=self.action_names)
|
||||
return composio_tools
|
||||
|
||||
def _build_wrapper(self) -> ComposioToolSet:
|
||||
|
|
|
|||
|
|
@ -415,6 +415,7 @@ def test_custom_component_get_function_entrypoint_return_type_no_return_type():
|
|||
CustomComponent class with a build method with no return type.
|
||||
"""
|
||||
my_code = """
|
||||
from langflow.custom import CustomComponent
|
||||
class MyClass(CustomComponent):
|
||||
def build():
|
||||
pass"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue