Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.chonkie.ai/llms.txt

Use this file to discover all available pages before exploring further.

Embeddings are handled by the CohereEmbeddings class, which is a wrapper around the Cohere API.

Installation

Embeddings require the cohere library. See the Installation Guide for more information.

Usage

from chonkie import CohereEmbeddings

# Initialize Cohere embeddings
embeddings = CohereEmbeddings()

# Specify model and API key
embeddings = CohereEmbeddings(model="embed-english-light-v3.0", api_key="YOUR_API_KEY")

Example

embeddings = CohereEmbeddings()
vectors = embeddings.embed("your text here")
# Or you can
vectors = embeddings.embed_batch(["text1", "text2"])