Prerequisites
-
Install dependencies:
-
Set your credentials:
For OpenAI API:
Example
The following agent will generate files in different formats based on user requests.file_generation_tools.py
You can use the
output_directory parameter to specify a custom output directory for the generated files.
If not specified, the files will be available in the RunOutput object.Toolkit Params
| Parameter | Type | Default | Description |
|---|---|---|---|
enable_json_generation | bool | True | Enables JSON file generation |
enable_csv_generation | bool | True | Enables CSV file generation |
enable_pdf_generation | bool | True | Enables PDF file generation (requires reportlab) |
enable_txt_generation | bool | True | Enables text file generation |
output_directory | str | None | Custom output directory path |
all | bool | False | Enables all file generation types when True |
Toolkit Functions
| Name | Description |
|---|---|
generate_json_file | Generates a JSON file from data (dict, list, or JSON string) |
generate_csv_file | Generates a CSV file from tabular data |
generate_pdf_file | Generates a PDF document from text content |
generate_text_file | Generates a plain text file from string content |
Developer Resources
- View Tools