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) ([][]float64, error)
- func (o *LLM) Generate(ctx context.Context, prompts []string, options ...llms.CallOption) ([]*llms.Generation, error)
- func (o *LLM) GeneratePrompt(ctx context.Context, prompts []schema.PromptValue, options ...llms.CallOption) (llms.LLMResult, error)
- func (o *LLM) GetNumTokens(text string) int
- 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, ) ([][]float64, error)
CreateEmbedding creates embeddings for the given input texts.
func (*LLM) Generate ¶
func (o *LLM) Generate(ctx context.Context, prompts []string, options ...llms.CallOption) ([]*llms.Generation, error)
func (*LLM) GeneratePrompt ¶
func (o *LLM) GeneratePrompt(ctx context.Context, prompts []schema.PromptValue, options ...llms.CallOption) (llms.LLMResult, error)
func (*LLM) GetNumTokens ¶
Click to show internal directories.
Click to hide internal directories.