package
0.0.0-20250219065129-52aed497bc00
Repository: https://github.com/infinilabs/coco-server.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Functions
BatchedEmbed creates embeddings for the given input texts, batching them into batches of batchSize if needed.
BatchTexts splits strings by the length batchSize.
No description provided by the author
No description provided by the author
NewEmbedder creates a new Embedder from the given EmbedderClient, with some options that affect how embedding will be done.
WithBatchSize is an option for specifying the batch size.
WithStripNewLines is an option for specifying the should it strip new lines.
# Variables
ErrAllTextsLenZero is returned if all texts to be embedded has the combined length of zero.
ErrVectorsNotSameSize is returned if the vectors returned from the embeddings api have different sizes.
# Structs
No description provided by the author
# Interfaces
Embedder is the interface for creating vector embeddings from texts.
EmbedderClient is the interface LLM clients implement for embeddings.
# Type aliases
EmbedderClientFunc is an adapter to allow the use of ordinary functions as Embedder Clients.
No description provided by the author