-
-
Notifications
You must be signed in to change notification settings - Fork 505
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
Refactor tools documentation with comprehensive examples and improved… #408
Conversation
… structure - Updated tools documentation with new tabbed interface - Added detailed code and no-code examples for tool creation - Simplified tool registration and agent configuration examples - Improved readability and provided step-by-step guidance for tool implementation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @MervinPraison, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
Summary of Changes
This pull request focuses on refactoring the tools documentation to provide comprehensive examples and improve the overall structure. The primary goal is to enhance user understanding and facilitate easier implementation of custom tools within the PraisonAI framework. The changes include a new tabbed interface, detailed code and no-code examples for tool creation, simplified tool registration and agent configuration examples, and improved readability with step-by-step guidance.
Highlights
- Documentation Update: The tools documentation has been updated with a new tabbed interface to separate code and no-code examples.
- Code Examples: Detailed code examples have been added to demonstrate tool creation and agent configuration using the
praisonaiagents
library. - No-Code Examples: No-code examples are provided to illustrate how to create and use tools with minimal coding, leveraging YAML configurations.
- Simplified Examples: Tool registration and agent configuration examples have been simplified for better clarity and ease of use.
Changelog
- docs/tools/tools.mdx
- Introduced a tabbed interface to separate code and no-code examples for tool creation.
- Added detailed code examples demonstrating tool creation and agent assignment using
praisonaiagents
. - Included no-code examples using YAML configurations for tool and agent setup.
- Simplified the steps for creating custom tools and assigning them to agents.
- Improved the overall structure and readability of the documentation with step-by-step guidance.
- Removed the typing hints from the
internet_search_tool
definition in the code examples to simplify them.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command>
or @gemini-code-assist <command>
. Below is a summary of the supported commands.
Feature | Command | Description |
---|---|---|
Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/
folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
In realms of code, where agents roam,
A tool's the key to find their home.
With tabs and steps, the path is clear,
To build and use, and have no fear.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request enhances the tools documentation by introducing a tabbed interface, detailed code and no-code examples, and simplified tool registration and agent configuration examples. The changes aim to improve readability and provide step-by-step guidance for tool implementation. Overall, the changes are well-structured and contribute positively to the documentation.
Summary of Findings
- Inconsistent naming: The naming of the package
praisonaiagents
is inconsistent across the documentation. In some places, it's referred to aspraisonaiagents
and in others aspraisonai
. This inconsistency should be resolved for clarity. - Missing OpenAI API key instructions: The 'No Code' tab lacks explicit instructions on how to set up the OpenAI API key, which is crucial for users who prefer a no-code approach. This omission should be addressed to ensure a smooth user experience.
- Duplicated content: The 'Creating Custom Tool' section appears twice in the document, leading to redundancy. The duplicated section should be removed to maintain a concise and organized structure.
Merge Readiness
The pull request introduces valuable improvements to the documentation. However, addressing the inconsistencies in package naming, clarifying the OpenAI API key setup for the 'No Code' tab, and removing the duplicated 'Creating Custom Tool' section would significantly enhance the quality and clarity of the documentation. I am unable to approve this pull request, and recommend that these issues be addressed before merging.
<Steps> | ||
<Step title="Install PraisonAI"> | ||
Install the core package and duckduckgo_search package: | ||
```bash Terminal | ||
pip install praisonai duckduckgo_search | ||
``` | ||
</Step> | ||
<Step title="Create Custom Tool"> | ||
<Info> | ||
To add additional tools/features you need some coding which can be generated using ChatGPT or any LLM | ||
</Info> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
## Creating Custom Tool | ||
<Steps> | ||
<Step> | ||
Create any function that you want to use as a tool, that performs a specific task. | ||
```python | ||
from duckduckgo_search import DDGS | ||
|
||
def internet_search_tool(query: str): | ||
results = [] | ||
ddgs = DDGS() | ||
for result in ddgs.text(keywords=query, max_results=5): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅ Deploy Preview for praisonai ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
… structure