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

fix: Handle remote enums fetching dynamically #963

Merged
merged 9 commits into from
Dec 8, 2024

Conversation

kaavee315
Copy link
Contributor

@kaavee315 kaavee315 commented Dec 8, 2024

Important

Enhances Action handling by adding is_action utility, using load_action for instantiation, and updating dependencies and versioning.

  • Behavior:
    • Introduces is_action function in collections.py and workspace.py to check if an object is an Action.
    • Replaces direct Action instantiation with load_action in toolset.py and composio_openai/toolset.py.
    • Removes PEOPLEDATALABS_SEARCH_PERSON_DATA from Action enum in _action.py.
  • Functions:
    • Modifies get() in collections.py to use is_action.
    • Modifies check_for_missing_dependencies() in workspace.py to use is_action.
    • Modifies execute_action() and validate_tools() in toolset.py to use load_action.
    • Modifies execute_tool_call() in composio_openai/toolset.py to use load_action.
  • Versioning:
    • Updates version to 0.5.52-rc.1 in __version__.py and multiple setup.py files.
  • Dependencies:
    • Updates composio_core dependency version in multiple setup.py files.

This description was created by Ellipsis for 1385ca4. It will automatically update as commits are pushed.

Copy link

vercel bot commented Dec 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
composio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 8, 2024 3:54pm

@kaavee315 kaavee315 changed the title Collections handling Handle remote enums fetching dynamically Dec 8, 2024
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Incremental review on cc1d11c in 19 seconds

More details
  • Looked at 12 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. python/composio/client/enums/_action.py:4947
  • Draft comment:
    The PR description states that PEOPLEDATALABS_SEARCH_PERSON_DATA is removed from the Action enum, but the diff shows it being added. Please clarify this discrepancy.
  • Reason this comment was not posted:
    Comment did not seem useful.

Workflow ID: wflow_TtyLbaaCnBOT7Vez


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Reviewed everything up to 0ce948d in 1 minute and 33 seconds

More details
  • Looked at 97 lines of code in 5 files
  • Skipped 0 files when reviewing.
  • Skipped posting 5 drafted comments based on config settings.
1. python/composio/tools/env/host/workspace.py:174
  • Draft comment:
    The is_action function is defined here and in collections.py with the same logic. Consider refactoring it into a utility function to avoid code duplication.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The function is_action is defined twice in different files with the same logic. It would be better to refactor this into a utility function to avoid code duplication.
2. python/composio/tools/toolset.py:747
  • Draft comment:
    The load_action function is used here to replace direct Action instantiation. This change improves consistency and error handling across the codebase.
  • Reason this comment was not posted:
    Confidence changes required: 0%
    The load_action function is used multiple times in toolset.py to replace direct Action instantiation. This is a good change for consistency and error handling.
3. python/composio/tools/toolset.py:867
  • Draft comment:
    The load_action function is used here to replace direct Action instantiation. This change improves consistency and error handling across the codebase.
  • Reason this comment was not posted:
    Confidence changes required: 0%
    The load_action function is used multiple times in toolset.py to replace direct Action instantiation. This is a good change for consistency and error handling.
4. python/composio/tools/toolset.py:889
  • Draft comment:
    The load_action function is used here to replace direct Action instantiation. This change improves consistency and error handling across the codebase.
  • Reason this comment was not posted:
    Confidence changes required: 0%
    The load_action function is used multiple times in toolset.py to replace direct Action instantiation. This is a good change for consistency and error handling.
5. python/plugins/openai/composio_openai/toolset.py:179
  • Draft comment:
    The load_action function is used here to replace direct Action instantiation. This change improves consistency and error handling across the codebase.
  • Reason this comment was not posted:
    Confidence changes required: 0%
    The load_action function is used multiple times in toolset.py to replace direct Action instantiation. This is a good change for consistency and error handling.

Workflow ID: wflow_gfTHgzxAFOzDERI5


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Copy link

github-actions bot commented Dec 8, 2024

This comment was generated by github-actions[bot]!

JS SDK Coverage Report

📊 Coverage report for JS SDK can be found at the following URL:
https://pub-92e668239ab84bfd80ee07d61e9d2f40.r2.dev/coverage-12223191444/coverage/index.html

📁 Test report folder can be found at the following URL:
https://pub-92e668239ab84bfd80ee07d61e9d2f40.r2.dev/html-report-12223191444/html-report/report.html

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Incremental review on 36eb604 in 16 seconds

More details
  • Looked at 36 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. python/plugins/langchain/composio_langchain/toolset.py:85
  • Draft comment:
    Ensure that action is properly defined or imported, as the Action import was removed. This might cause a runtime error if action is not defined elsewhere.
  • Reason this comment was not posted:
    Comment did not seem useful.

Workflow ID: wflow_Qsc1EeMELLG6mFa3


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Incremental review on 7500e92 in 12 seconds

More details
  • Looked at 372 lines of code in 17 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. python/plugins/autogen/setup.py:12
  • Draft comment:
    Ensure that the use of a release candidate version (0.5.52-rc.1) aligns with the project's release strategy. This versioning is consistent across all plugins and core packages.
  • Reason this comment was not posted:
    Confidence changes required: 33%
    The versioning in the setup.py files has been updated to a release candidate version (0.5.52-rc.1). This is consistent across all plugins and core packages, which is good for consistency. However, it's important to ensure that this versioning strategy aligns with the overall release strategy of the project.

Workflow ID: wflow_zbVKtxzffg1UD7sN


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@angrybayblade angrybayblade changed the title Handle remote enums fetching dynamically fix: Handle remote enums fetching dynamically Dec 8, 2024
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Incremental review on 1385ca4 in 13 seconds

More details
  • Looked at 47 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. python/composio/tools/env/host/workspace.py:174
  • Draft comment:
    Consider refactoring the repeated logic of converting actions to Action objects into a utility function to avoid code duplication and improve maintainability. This logic is also present in collections.py.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The code in check_for_missing_dependencies uses a list comprehension to convert actions to Action objects if they are not already instances of Action. This is a good practice to ensure type consistency. However, the same logic is repeated in collections.py. It would be better to refactor this into a utility function to avoid code duplication and improve maintainability.

Workflow ID: wflow_aPdWaJL7y5JznpIn


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@kaavee315 kaavee315 merged commit 1928b43 into master Dec 8, 2024
12 checks passed
@kaavee315 kaavee315 deleted the kaavee/fix_enum_issue_letta branch December 8, 2024 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants