Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(v *VoyageAI)
Option is a function type that can be used to modify the client.
func WithBatchSize ¶
WithBatchSize is an option for specifying the batch size.
func WithClient ¶
WithClient is an option for providing a custom http client.
func WithStripNewLines ¶
WithStripNewLines is an option for specifying the should it strip new lines.
type VoyageAI ¶
type VoyageAI struct { Model string StripNewLines bool BatchSize int // contains filtered or unexported fields }
VoyageAI is the embedder using the VoyageAI api to create embeddings.
func NewVoyageAI ¶
NewVoyageAI returns a new embedder that uses the VoyageAI api. The default model is "voyage-2". Use `WithModel` to change the model.
func (*VoyageAI) EmbedDocuments ¶
EmbedDocuments implements the `embeddings.Embedder` and creates an embedding for each of the texts.
Click to show internal directories.
Click to hide internal directories.