Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Huggingface ¶
type Huggingface struct { Model string Task string StripNewLines bool BatchSize int // contains filtered or unexported fields }
Huggingface is the embedder using the Huggingface hub api.
func NewHuggingface ¶
func NewHuggingface(opts ...Option) (*Huggingface, error)
func (*Huggingface) EmbedDocuments ¶
func (*Huggingface) EmbedQuery ¶
type Option ¶
type Option func(p *Huggingface)
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 ¶
func WithClient(client huggingface.LLM) Option
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.