Skip to content

feat: Add CSV loader for document processing#1175

Open
piccassol wants to merge 1 commit into0xPlaygrounds:mainfrom
piccassol:csv-loader-clean
Open

feat: Add CSV loader for document processing#1175
piccassol wants to merge 1 commit into0xPlaygrounds:mainfrom
piccassol:csv-loader-clean

Conversation

@piccassol
Copy link

Summary

Adds CsvFileLoader for loading and processing CSV files into documents suitable for embedding and LLM processing.

Changes

  • Adds CsvFileLoader in rig-core/src/loaders/csv.rs
  • Supports glob patterns and directory loading (consistent with existing loaders)
  • Configurable CSV parsing (delimiters, headers, flexible mode)
  • Two loading modes:
    • Row-by-row: Each row becomes a separate document
    • Whole document: Entire CSV becomes one document
  • Rows formatted as "header: value" pairs for LLM readability
  • Adds csv feature flag
  • Includes example in rig-core/examples/csv_loader.rs
  • Comprehensive tests included

Closes #29

Testing

cargo test --features csv
cargo run --example csv_loader --features csv

- Adds CsvFileLoader for loading and processing CSV files
- Supports glob patterns, directory loading, and configurable parsing
- Includes row-by-row and whole-document loading modes
- Adds comprehensive tests and example

Closes 0xPlaygrounds#29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: CSV loader support

1 participant