Documentation ¶
Index ¶
- Variables
- type LLM
- func (o *LLM) Call(ctx context.Context, prompt string, options ...llms.CallOption) (string, error)
- func (o *LLM) CreateEmbedding(ctx context.Context, inputTexts []string, model string, task string) ([][]float32, error)
- func (o *LLM) GenerateContent(ctx context.Context, messages []llms.MessageContent, ...) (*llms.ContentResponse, error)
- type Option
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type LLM ¶
func (*LLM) CreateEmbedding ¶
func (o *LLM) CreateEmbedding( ctx context.Context, inputTexts []string, model string, task string, ) ([][]float32, error)
CreateEmbedding creates embeddings for the given input texts.
func (*LLM) GenerateContent ¶
func (o *LLM) GenerateContent(ctx context.Context, messages []llms.MessageContent, options ...llms.CallOption) (*llms.ContentResponse, error)
GenerateContent implements the Model interface.
type Option ¶
type Option func(*options)
func WithModel ¶
WithModel passes the HuggingFace model to the client. If not set, then will be used default model.
Click to show internal directories.
Click to hide internal directories.