Observed since 20 Oct, 23:21 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
agentset chunker
Agentset Chunker is a versatile tool designed to process and chunk various types of documents, making it easier to manage, analyze, and utilize their content. This repository is created for Retrieval-Augmented Generation (RAG) systems, allowing you to chunk your files efficiently for RAG systems. It supports a wide range of document formats, including text files, PDFs, DOCX files, HTML, and more. The core functionality of this project is to break down documents into smaller, manageable chunks, which can then be used for tasks like information retrieval, summarization, and data extraction.
The Agentset Chunker project operates through the following key components:
Chunker Function (chunker.py):
Strategy.BY_TITLE: Chunks based on titles or headings in the document (if available).Strategy.BASIC: Chunks based on a simple character count with overlap.ocr_force: Option for using OCR (Optical Character Recognition).max_characters: Maximum number of characters per chunk.overlap: Number of characters overlapping between chunks.Chunking Modules (chunking/)
pdf.py : Chunks PDF files.docx.py: Chunks DOCX files.doc.py: Chunks DOC files.txt.py: Chunks TXT files.md.py: Chunks MD files.json.py: Chunks JSON files.html.py: Chunks HTML and HTM files.Connector (connector/)
Document Representation (langchain-core/documents/base.py):
langchain_core.documents.Document class to represent each chunk.Document has page_content (the text of the chunk) and metadata (additional information).Before you can use Agentset Chunker, you need to have the following installed:
uv pip install -r pyproject.tomlClone the Repository:
git clone https://github.com/agentset-ai/agentset-chunker.git
cd agentset-chunker
Create a Virtual Environment (Recommended):
python3 -m venv .venv
source .venv/bin/activate # On Linux/macOS
.venv\Scripts\activate # On Windows
Install Dependencies:
pip install .
If you use uv you can run : uv pip install ..
import json
from agentset_chunker import chunker, Strategy
with open('./chunked.json', 'w') as file:
res = chunker(
"https://site.com/example.pdf",
strategy=Strategy.BY_TITLE)
file.write(json.dumps([c.__dict__ for c in res]))
htm, htmlpdf, docx, doc, text, md, jsonContributions are welcome! If you find any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request.
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 1.0.1 | 8 Mar 2025 | 5 |
This describes our collected data; it is not a security assessment.
Shared repository data · GitHub
Observed since 20 Oct, 23:21 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:bb3ed09f55e1d02e3037eac7736e84f91c48082902ec48e93d01cb591607fb82