Skip to content

v1.2.0

Choose a tag to compare

@chonknick chonknick released this 28 Aug 18:53
· 1298 commits to main since this release
image

✨ Highlights

  • New SemanticChunker with advance peak detection, skip_window support, group embedding support and better thresholding! The new semantic chunker requires much less tuning for consistently sized chunks.
# Import the chunker
from chonkie import SemanticChunker

# Initialize the chunker
chunker = SemanticChunker(chunk_size=512)

# define the text
text = ...

# CHONK!
chunk = chunker(text)
  • Support for MongoDB via MongoDBHandshake!
from chonkie import MongoDBHandshake, SemanticChunker

# Initialize the handshake
handshake = MongoDBHandshake(uri="mongodb://localhost:8080", db_name="my_documents")

# Create some chunks
chunker = SemanticChunker()
chunks = chunker.chunk("Chonkie loves to chonk your texts!")

# Write chunks to MongoDB
handshake.write(chunks)
  • Support for Pinecone via PineconeHandshake!
from chonkie import PineconeHandshake, SemanticChunker

# Initialize the handshake
handshake = PineconeHandshake(api_key=...)

# Create some chunks
chunker = SemanticChunker()
chunks = chunker.chunk("Chonkie loves to chonk your texts!")

# Write chunks to Pinecone
handshake.write(chunks)
  • Support for Weaviate via WeaviateHandshake!
from chonkie import WeaviateHandshake, SemanticChunker

# Initialize the handshake
handshake = WeaviateHandshake(url=url, api_key=...)

# Create some chunks
chunker = SemanticChunker()
chunks = chunker.chunk("Chonkie loves to chonk your texts!")

# Write chunks to Weaviate
handshake.write(chunks)

What's Changed

New Contributors

Full Changelog: v1.1.2...v1.2.0