From 2d6067528e896e61d5c6f11aa3a251ab0dc8a89e Mon Sep 17 00:00:00 2001 From: angrybayblade Date: Wed, 16 Oct 2024 13:16:32 +0530 Subject: [PATCH 1/2] fix: use default value instead of field info to generate tool parameter for lamaindex tool --- python/composio/utils/shared.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/composio/utils/shared.py b/python/composio/utils/shared.py index 4646495ccb..7d822687ab 100644 --- a/python/composio/utils/shared.py +++ b/python/composio/utils/shared.py @@ -374,7 +374,7 @@ def demo_function( name=param_name, kind=Parameter.POSITIONAL_OR_KEYWORD, annotation=param_dtype, - default=parame_field, + default=parame_field.default, ) all_parameters.append(param) From 42b15137ed82ec0fe40bd446fffa82cb69a0a73a Mon Sep 17 00:00:00 2001 From: angrybayblade Date: Wed, 16 Oct 2024 14:07:53 +0530 Subject: [PATCH 2/2] fix: test --- python/tests/test_utils/test_shared.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/python/tests/test_utils/test_shared.py b/python/tests/test_utils/test_shared.py index 54d74069b6..9e583182f0 100644 --- a/python/tests/test_utils/test_shared.py +++ b/python/tests/test_utils/test_shared.py @@ -33,11 +33,6 @@ def test_get_pydantic_signature_format_from_schema_params() -> None: assert isinstance(result[1], Parameter) assert result[0].name == "owner" assert result[1].name == "repo" - assert result[0].default.description == "The account owner of the repository." - assert ( - result[1].default.description - == "The name of the repository without the `.git` extension." - ) def test_json_schema_to_pydantic_field() -> None: