Skip to main content

Module embedding

Module embedding 

Source

Structs§

Embedder

Functions§

bytes_to_embedding
Convert bytes back to f32 embedding
chunk_text
Chunk text into segments of approximately max_tokens tokens with overlap token overlap.
cosine_similarity
Cosine similarity between two embeddings
embedding_to_bytes
Convert f32 embedding to bytes for storage