Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use default value instead of field info to generate tool parameter for lamaindex tool #711

Merged
merged 2 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python/composio/utils/shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
5 changes: 0 additions & 5 deletions python/tests/test_utils/test_shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Loading