docs: improve tool documentation and examples

- Update SerperDevTool documentation with accurate parameters and JSON response format
- Enhance XMLSearchTool and MDXSearchTool docs with RAG capabilities and required parameters
- Fix code block formatting across multiple tool documentation files
- Add clarification about environment variables and configuration
- Validate all examples against actual implementations
- Successfully tested with mkdocs build

Co-Authored-By: Joe Moura <joao@crewai.com>
This commit is contained in:
Devin AI
2024-12-28 04:32:08 +00:00
parent 99fe91586d
commit a499d9de42
14 changed files with 464 additions and 64 deletions

View File

@@ -23,11 +23,11 @@ To install the JSONSearchTool, use the following pip command:
pip install 'crewai[tools]'
```
## Usage Examples
## Example
Here are updated examples on how to utilize the JSONSearchTool effectively for searching within JSON files. These examples take into account the current implementation and usage patterns identified in the codebase.
```python Code
```python
from crewai.json_tools import JSONSearchTool # Updated import path
# General JSON content search
@@ -47,7 +47,7 @@ tool = JSONSearchTool(json_path='./path/to/your/file.json')
The JSONSearchTool supports extensive customization through a configuration dictionary. This allows users to select different models for embeddings and summarization based on their requirements.
```python Code
```python
tool = JSONSearchTool(
config={
"llm": {
@@ -70,4 +70,4 @@ tool = JSONSearchTool(
},
}
)
```
```