Catalog PyPI
Back to packageRELEASE DETAILS

0.0.6

PyPI

agentic-chunker

A tool for improving the quality of chunks.

Published14 Apr 2025
Direct dependencies2
Transitive dependenciesNot calculated

README

Version 0.0.6 documentation

AGENTIC CHUNKER

Installation

pip install agentic-chunker

Usage

from agentic_chunker import AgenticChunker
import markdown
import os

file_path = "test_files/pronoun_dep.md"
api_key = os.environ.get('OPENAI_APIKEY')
with open(file_path, 'r', encoding='utf-8') as f:
    md_content = f.read()
text = markdown.markdown(md_content)
chunker = AgenticChunker(api_key=api_key, model="gpt-4o-mini")
chunks = chunker.agentic_chunking(text, '.')
from agentic_chunker import AgenticChunker
from langchain.text_splitter import CharacterTextSplitter
import markdown
import os

file_path = "test_files/pronoun_dep.md"
api_key = os.environ.get('OPENAI_APIKEY')
with open(file_path, 'r', encoding='utf-8') as f:
    md_content = f.read()

text = markdown.markdown(md_content)
chunker = AgenticChunker(api_key=api_key, model="gpt-4o-mini")
text_splitter = CharacterTextSplitter(
    separator="\n",
    chunk_size=100,
    chunk_overlap=20
)
chunks = text_splitter.create_documents([text])

new_chunks = chunker.rechunk_langchain_chunks(chunks)

Dependencies

  • openai

Contributing

Contributions to AgenticChunker are welcome! Please make sure to follow the code style and conventions used in the project. If you have any suggestions or improvements, feel free to open an issue or submit a pull request.

License

This project is licensed under the GPL-3.0 License.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 2

Native requirements
2 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
openai
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "",
  "evaluation": "NOT_EVALUATED"
}
openai>=1.24.1runtime
tqdm
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": "",
  "evaluation": "NOT_EVALUATED"
}
tqdm>=4.11.1runtime

Distribution files

2 collected
agentic_chunker-0.0.6-py3-none-any.whl

bdist_wheel · 16.13 KB · Python py3

Source file
agentic_chunker-0.0.6.tar.gz

sdist · 15.44 KB · Python source

Source file

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 22:12 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:af692e5d46a206ade2e71cc77312f8ce44d7f029a65e8a64ebef252765e135bd

Other collected versions

View all collected versions →