Tools
CSV
CsvTools enable an Agent to read and write CSV files.
Example
The following agent will download the IMDB csv file and allow the user to query it using a CLI app.
cookbook/tools/csv_tools.py
Toolkit Params
Parameter | Type | Default | Description |
---|---|---|---|
csvs | List[Union[str, Path]] | - | A list of CSV files or paths to be processed or read. |
row_limit | int | - | The maximum number of rows to process from each CSV file. |
read_csvs | bool | True | Enables the functionality to read data from specified CSV files. |
list_csvs | bool | True | Enables the functionality to list all available CSV files. |
query_csvs | bool | True | Enables the functionality to execute queries on data within CSV files. |
read_column_names | bool | True | Enables the functionality to read the column names from the CSV files. |
duckdb_connection | Any | - | Specifies a connection instance for DuckDB database operations. |
duckdb_kwargs | Dict[str, Any] | - | A dictionary of keyword arguments for configuring DuckDB operations. |
Toolkit Functions
Function | Description |
---|---|
list_csv_files | Lists all available CSV files. |
read_csv_file | This function reads the contents of a csv file |
get_columns | This function returns the columns of a csv file |
query_csv_file | This function queries the contents of a csv file |
Information
- View on Github