Documentation ¶
Index ¶
- Variables
- type LLM
- func (o *LLM) Call(ctx context.Context, prompt string, options ...llms.CallOption) (string, error)
- func (o *LLM) Generate(ctx context.Context, prompts []string, options ...llms.CallOption) ([]*llms.Generation, error)
- func (o *LLM) GeneratePrompt(ctx context.Context, promptValues []schema.PromptValue, ...) (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) 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, promptValues []schema.PromptValue, options ...llms.CallOption, ) (llms.LLMResult, error)
func (*LLM) GetNumTokens ¶
type Option ¶
type Option func(*options)
func WithBaseURL ¶
WithBaseURL passes the Cohere base url to the client. If not set, the base url is read from the COHERE_BASE_URL environment variable. If still not set in ENV VAR COHERE_BASE_URL, then the default value is https://api.cohere.ai is used.
Click to show internal directories.
Click to hide internal directories.