Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OpenAI ¶
OpenAI is the embedder using the OpenAI api.
func NewOpenAI ¶
NewOpenAI creates a new OpenAI with options. Options for client, strip new lines and batch.
func (OpenAI) EmbedDocuments ¶
EmbedDocuments creates one vector embedding for each of the texts.
type Option ¶
type Option func(p *OpenAI)
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 the LLM client.
func WithStripNewLines ¶
WithStripNewLines is an option for specifying the should it strip new lines.
Click to show internal directories.
Click to hide internal directories.