docs: Update GPT4 documentation with available tools and use cases (#2580)

Updates the GPT-4 documentation and the `GPT4Brain` class to include
detailed information about the tools available for GPT4Brain and their
use cases.

- **Documentation (`docs/brains/gpt4.mdx`):**
- Adds a new section titled "Tools Available for GPT4Brain" that
describes specific tools: WebSearchTool, ImageGeneratorTool,
URLReaderTool, and EmailSenderTool.
- Provides use cases for each tool, demonstrating how they can be
utilized within GPT4Brain for various scenarios, such as generating
images, reading content from URLs, and sending emails.

- **Code (`backend/modules/brain/integrations/GPT4/Brain.py`):**
- Updates the class documentation to include information about the tools
available for GPT4Brain and outlines use cases for WebSearchTool,
ImageGeneratorTool, URLReaderTool, and EmailSenderTool.
- Maintains the existing functionality of the `GPT4Brain` class,
ensuring compatibility with the newly documented tools and use cases.


---

For more details, open the [Copilot Workspace
session](https://copilot-workspace.githubnext.com/QuivrHQ/quivr?shareId=2c2c1666-e5fb-4a06-bb08-ca967f4fe276).
This commit is contained in:
Stan Girard 2024-05-10 18:33:21 +02:00 committed by GitHub
parent 28efaf5658
commit bbcca2a8fe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 30 additions and 5 deletions

View File

@ -35,11 +35,20 @@ chat_service = ChatService()
class GPT4Brain(KnowledgeBrainQA):
"""This is the Notion brain class. it is a KnowledgeBrainQA has the data is stored locally.
It is going to call the Data Store internally to get the data.
Args:
KnowledgeBrainQA (_type_): A brain that store the knowledge internaly
"""
GPT4Brain integrates with GPT-4 to provide real-time answers and supports various tools to enhance its capabilities.
Available Tools:
- WebSearchTool: Performs web searches to find relevant information.
- ImageGeneratorTool: Generates images based on textual descriptions.
- URLReaderTool: Reads and summarizes content from URLs.
- EmailSenderTool: Sends emails with specified content.
Use Cases:
- WebSearchTool can be used to find the latest news articles on a specific topic or to gather information from various websites.
- ImageGeneratorTool is useful for creating visual content based on textual prompts, such as generating a company logo based on a description.
- URLReaderTool can be used to summarize articles or web pages, making it easier to quickly understand the content without reading the entire text.
- EmailSenderTool enables automated email sending, such as sending a summary of a meeting's minutes to all participants.
"""
tools: Optional[List[BaseTool]] = None

View File

@ -43,4 +43,20 @@ To add a GPT-4 Brain to Quivr, you need to perform the following steps:
</Step>
</Steps>
## Tools Available for GPT4Brain
GPT4Brain is equipped with a variety of tools to enhance its capabilities and provide more comprehensive answers. These tools include:
- **WebSearchTool**: Allows GPT4Brain to perform web searches to find relevant information.
- **ImageGeneratorTool**: Enables GPT4Brain to generate images based on textual descriptions.
- **URLReaderTool**: Allows GPT4Brain to read and summarize content from URLs.
- **EmailSenderTool**: Enables GPT4Brain to send emails with specified content.
### Use Cases
Here are some use cases demonstrating how each tool can be utilized within GPT4Brain:
- **WebSearchTool**: Can be used to find the latest news articles on a specific topic or to gather information from various websites.
- **ImageGeneratorTool**: Useful for creating visual content based on textual prompts, such as generating a company logo based on a description.
- **URLReaderTool**: Can be used to summarize articles or web pages, making it easier to quickly understand the content without reading the entire text.
- **EmailSenderTool**: Enables automated email sending, such as sending a summary of a meeting's minutes to all participants.