Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChatOpenAI ¶
type ChatOpenAI struct { StripNewLines bool BatchSize int // contains filtered or unexported fields }
ChatOpenAI is the embedder using the OpenAI api.
func NewChatOpenAI ¶
func NewChatOpenAI(opts ...ChatOption) (ChatOpenAI, error)
NewChatOpenAI creates a new ChatOpenAI with options. Options for client, strip new lines and batch.
func (ChatOpenAI) EmbedDocuments ¶
func (ChatOpenAI) EmbedQuery ¶
type ChatOption ¶
type ChatOption func(p *ChatOpenAI)
func WithBatchSize ¶
func WithBatchSize(batchSize int) ChatOption
WithBatchSize is an option for specifying the batch size.
func WithClient ¶
func WithClient(client openai.Chat) ChatOption
WithClient is an option for providing the LLM client.
func WithStripNewLines ¶
func WithStripNewLines(stripNewLines bool) ChatOption
WithStripNewLines is an option for specifying the should it strip new lines.
Click to show internal directories.
Click to hide internal directories.