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

feat: update docs #1167

Merged
merged 11 commits into from
Jan 8, 2025
Merged

feat: update docs #1167

merged 11 commits into from
Jan 8, 2025

Conversation

abhishekpatil4
Copy link
Contributor

@abhishekpatil4 abhishekpatil4 commented Jan 7, 2025

  1. Add ComposioToolSet description
  2. Add packages installation snippets
  3. minor changes

Important

Enhance Composio documentation with detailed descriptions, installation snippets, and minor fixes for improved user guidance.

  • Documentation Enhancements:
    • Add description for ComposioToolSet in phidata.mdx.
    • Update quickstart-tools.mdx and quickstart-triggers.mdx with detailed steps and tips for using tools and triggers.
    • Add installation snippets for Python and JavaScript in custom-action-without-auth.mdx, action-guide-with-agents.mdx, action-guide-without-agents.mdx, configure-tools.mdx, get-action-inputs.mdx, processing-actions.mdx, use-tools-with-your-auth.mdx, what-are-tools.mdx, and triggers.mdx.
  • Minor Fixes:
    • Correct typos and improve formatting across all updated documentation files.

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

Copy link

vercel bot commented Jan 7, 2025

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 Jan 8, 2025 11:47am

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 8d77b4b in 44 seconds

More details
  • Looked at 434 lines of code in 12 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. docs/patterns/tools/build-tools/custom-action-without-auth.mdx:27
  • Draft comment:
    The import statement for 'action' should be 'Action' to match the naming convention used elsewhere in the code.
from composio_openai import ComposioToolSet, Action
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable:
    The comment suggests changing the import to use 'Action', but in the actual code it's used as a decorator '@action' which implies it should be lowercase. Without seeing the actual composio_openai library source code, I can't be 100% certain which is correct. The current usage matches the lowercase version. Making assumptions about naming conventions without seeing the library internals is risky.
    I don't have access to the composio_openai library source code to verify the correct import name. The current code appears to work as shown.
    Since the code demonstrates working usage with the lowercase 'action' and we don't have strong evidence that 'Action' is correct, we should not keep this comment.
    Delete this comment as we don't have strong evidence that the suggested change is correct, and the existing code appears to work as demonstrated.
2. docs/framework/phidata.mdx:19
  • Draft comment:
    The import statement for 'action' should be 'Action' to match the naming convention used elsewhere in the code.
from composio_phidata import Action, App, ComposioToolSet
  • Reason this comment was not posted:
    Comment was on unchanged code.

Workflow ID: wflow_w2n3ODvFWEo3sG6r


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

@@ -27,7 +38,7 @@ action_schema = composio_toolset.get_action_schemas(actions=[Action.GITHUB_STAR_
print(json.dumps(action_schema[0].parameters.properties, indent=2))
```

```javascript Javascript
```javascript JavaScript
Copy link
Collaborator

Choose a reason for hiding this comment

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

There's an inconsistency in the capitalization of "JavaScript". In this file it's written as "Javascript" while in other documentation files it's written as "JavaScript". Please maintain consistency by using "JavaScript" throughout the documentation.


### Arguments Accepted by ComposioToolSet

#### Basic Uscase:
Copy link
Collaborator

Choose a reason for hiding this comment

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

In the documentation, "Usecase" should be written as "Use case" to follow proper English conventions. This appears in multiple places in the documentation.

<Tab title="Python">
Use the `ComposioToolSet` class to use and configure tools:
- Use `composio-core` package for direct action execution
- Use framework-specific packages (like `composio-langchain` or `composio-crewai`) when working with Agentic frameworkswhat
Copy link
Collaborator

Choose a reason for hiding this comment

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

There's a typo in the word "frameworkswhat" on line 38. This should be "frameworks".

- `base_url`: Base URL for the Composio API server
- `output_in_file`: Whether to output the result to a file.
- `workspace_id`: Workspace ID for loading an existing workspace
- `workspace_config`:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Some configuration parameters lack descriptions. Please add descriptions for workspace_config and max_retries parameters to help users understand their purpose and usage.

@shreysingla11
Copy link
Collaborator

Documentation Review Summary

Overall, this PR makes significant improvements to the documentation by adding installation instructions and clarifying tool configurations. Here's a detailed review:

Positive Aspects:

✅ Good organization of documentation with clear sections and steps
✅ Added missing installation instructions for different packages
✅ Improved clarity in tool configuration documentation
✅ Better explanation of entity IDs and authentication

Areas for Improvement:

  1. Consistency Issues:

    • Inconsistent capitalization of "JavaScript" vs "Javascript"
    • Inconsistent usage of "Use case" vs "Usecase"
  2. Documentation Completeness:

    • Some configuration parameters (workspace_config, max_retries) lack descriptions
    • Consider adding version requirements for packages
    • Add minimum Python/Node.js version requirements
  3. Typos:

    • "frameworkswhat" should be "frameworks"

Recommendations:

  1. Maintain consistent capitalization and terminology throughout the documentation
  2. Add missing parameter descriptions
  3. Consider adding version requirements information
  4. Fix identified typos

The changes are well-structured and will improve the developer experience. With the suggested improvements, the documentation will be more complete and consistent.

Rating: 8/10 - Good improvements with minor issues to address.

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 e167030 in 42 seconds

More details
  • Looked at 177 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. docs/faq/integrations_and_connections/list_of_tools.mdx:19
  • Draft comment:
    The JavaScript code uses 'await' outside of an async function, which will cause an error. Consider wrapping it in an async function or using '.then()' for handling promises.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable:
    Documentation code often omits boilerplate like async function wrappers for clarity. The target audience understands that await requires async context. This is a common documentation practice. The code clearly demonstrates the API usage pattern which is the main goal.
    The comment is technically correct - the code as written would throw an error if copied exactly. Some developers might copy-paste without understanding async/await requirements.
    While technically correct, adding async boilerplate would make the documentation more cluttered and harder to read. The async/await pattern is fundamental JavaScript knowledge that the target audience should have.
    Delete the comment. Documentation code examples often omit obvious boilerplate for clarity, and this is an acceptable practice here.
2. docs/patterns/tools/what-are-tools.mdx:108
  • Draft comment:
    The JavaScript code uses 'await' outside of an async function, which will cause an error. Consider wrapping it in an async function or using '.then()' for handling promises. This issue is also present in other JavaScript code snippets in this file.
  • Reason this comment was not posted:
    Marked as duplicate.

Workflow ID: wflow_e40JUGuFMR3VssJK


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

Comment on lines 39 to 46
```
</Tab>
<Tab title="JavaScript">
Install packages:
```bash
npm install composio-core
```
Here you need to pass the authentication parameters inside the `authConfig`. `in_` is where you want to add the auth, `name` is the name of the header you want to add and `value` is the value of the header.

Choose a reason for hiding this comment

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

Formatting Issue: The code block for installing the JavaScript package is not properly formatted. The closing backticks for the code block are missing, which can lead to rendering issues in the documentation. Additionally, ensure consistency in the formatting style across different sections of the document.

🔧 Suggested Code Diff:
 ```bash
 npm install composio-core

</details>
<!-- suggestion_start -->

<details>
<summary><strong>📝 Committable Code Suggestion</strong></summary>

> ‼️ Ensure you review the code suggestion before committing it to the branch. Make sure it replaces the highlighted code, contains no missing lines, and has no issues with indentation. 

```suggestion
<Tab title="JavaScript">

```bash
npm install composio-core
```

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 8fa5d7b in 26 seconds

More details
  • Looked at 327 lines of code in 9 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. docs/framework/autogen.mdx:49
  • Draft comment:
    Typo in 'resigter', should be 'register'.
  • Reason this comment was not posted:
    Confidence changes required: 10%
    The typo in the word 'resigter' should be corrected to 'register'.

Workflow ID: wflow_3qjMgd1kd9lfFd2w


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

Comment on lines 76 to +83

# Get all actions from a tool
tools = tool_set.get_tools(apps=[App.GITHUB])

# Get specific actions
tools = tool_set.get_tools(actions=[Action.GITHUB_STAR_A_REPOSITORY_FOR_THE_AUTHENTICATED_USER])
```

</Step>
</Steps>
</Tab>
<Tab title="JavaScript">

Choose a reason for hiding this comment

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

Potential Issue: The code change introduces a specific action filter for retrieving tools, which may conflict with other parts of the PR that remove such filtering. This inconsistency could lead to unexpected behavior in tool retrieval, especially concerning GitHub actions. It seems to be part of a broader refactoring effort, but the intent and impact need clarification to ensure consistent behavior across the application.


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 7eb76ae in 33 seconds

More details
  • Looked at 71 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. docs/patterns/tools/what-are-tools.mdx:46
  • Draft comment:
    Typo: 'Uscase' should be 'Use Case'. This typo is also present on lines 44, 49, and 56.
  • Reason this comment was not posted:
    Comment was not on a valid diff hunk.
2. docs/patterns/tools/what-are-tools.mdx:82
  • Draft comment:
    Typo: 'Uscase' should be 'Use Case'. This typo is also present on lines 44, 49, and 56.
  • Reason this comment was not posted:
    Marked as duplicate.

Workflow ID: wflow_RbR7srnfV8T7F6gM


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

Comment on lines 11 to +18
## Creating a Custom Tool without Authentication

<Steps>
<Step title="Import necessary modules">

<Step title="Install required libraries">
<CodeGroup>
```bash Python
pip install composio-openai openai
```

Choose a reason for hiding this comment

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

Documentation Improvement: The change adds a step to install required libraries, which is a beneficial addition to the documentation. However, the step title 'Import necessary modules' was removed, which might lead to confusion if the import step is still necessary. Consider re-adding or clarifying the import step if it is required.

🔧 Suggested Code Diff:
 ## Creating a Custom Tool without Authentication

 <Steps>
+<Step title="Import necessary modules">
+<CodeGroup>
+```python
+import composio_openai
+import openai
+```
+<Step title="Install required libraries">
<CodeGroup>
```bash
pip install composio-openai openai
📝 Committable Code Suggestion

‼️ Ensure you review the code suggestion before committing it to the branch. Make sure it replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
## Creating a Custom Tool without Authentication
<Steps>
<Step title="Import necessary modules">
<Step title="Install required libraries">
<CodeGroup>
```bash Python
pip install composio-openai openai
```
## Creating a Custom Tool without Authentication
<Steps>
<Step title="Import necessary modules">
<CodeGroup>
```python
import composio_openai
import openai
```bash pip install composio-openai openai ``` ```

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 e743507 in 36 seconds

More details
  • Looked at 55 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. docs/patterns/tools/build-tools/custom-action-with-auth.mdx:191
  • Draft comment:
    The JavaScript code snippet for using connection parameters is missing. Consider adding a JavaScript example similar to the Python one for consistency.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable:
    The comment is about a deliberate placeholder that says "coming soon!" This indicates the authors are aware the JavaScript example is missing and plan to add it later. The comment doesn't provide any new information or identify an actual issue that needs fixing. The placeholder itself already communicates that JavaScript support is planned.
    The comment could be helpful for tracking what documentation needs to be completed. Missing examples could confuse JavaScript developers.
    The "coming soon!" placeholder already serves as a tracking mechanism, and the authors clearly know JavaScript examples are needed since they've included them in other sections.
    Delete the comment since it doesn't provide any new information beyond what's already communicated by the "coming soon!" placeholder.

Workflow ID: wflow_KOXUrNbZNf32htqc


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 631ac2e in 17 seconds

More details
  • Looked at 39 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. docs/mint.json:403
  • Draft comment:
    Ensure the destination URL for the changelog redirect is correct and accessible.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The PR adds a new redirect in the mint.json file, which is a good addition for user navigation. However, the destination URL should be checked for correctness.

Workflow ID: wflow_ny6stOHUYvJReftp


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

@Karthikeya-Meesala Karthikeya-Meesala merged commit 5f53b74 into master Jan 8, 2025
11 of 12 checks passed
@Karthikeya-Meesala Karthikeya-Meesala deleted the feat/add-toolset-docs branch January 8, 2025 11:48
Comment on lines 76 to +83

# Get all actions from a tool
tools = tool_set.get_tools(apps=[App.GITHUB])

# Get specific actions
tools = tool_set.get_tools(actions=[Action.GITHUB_STAR_A_REPOSITORY_FOR_THE_AUTHENTICATED_USER])
```

</Step>
</Steps>
</Tab>
<Tab title="JavaScript">

Choose a reason for hiding this comment

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

Code Improvement: The code change involves switching from retrieving all actions to retrieving specific actions. This change improves clarity by specifying the exact action needed, which can enhance performance by reducing unnecessary data retrieval. However, ensure that the Action.GITHUB_STAR_A_REPOSITORY_FOR_THE_AUTHENTICATED_USER is correctly defined and available in the context where this code is executed. Additionally, ensure that the get_tools method supports filtering by actions as expected.


Comment on lines 31 to +38
</Tab>
<Tab title="Python">
<Steps>
<Step title="Import packages">
<Step title="Install required libraries">
```bash Python
pip install composio-core
```
</Step>

Choose a reason for hiding this comment

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

Code Clarity: The change from 'Import packages' to 'Install required libraries' is appropriate and clarifies the step's purpose. However, ensure the code block is correctly formatted for bash commands. The current format may confuse users as it includes 'Python' in the bash command block, which is unnecessary.

🔧 Suggested Code Diff:
-```bash Python
+```bash
pip install composio-core
📝 Committable Code Suggestion

‼️ Ensure you review the code suggestion before committing it to the branch. Make sure it replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
</Tab>
<Tab title="Python">
<Steps>
<Step title="Import packages">
<Step title="Install required libraries">
```bash Python
pip install composio-core
```
</Step>
<Tab title="Python">
<Steps>
<Step title="Install required libraries">
```bash
pip install composio-core
```

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.

4 participants