Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Anthropic ¶
func NewAnthropic ¶
func NewAnthropic(apiKey string, optFns ...func(o *AnthropicOptions)) (*Anthropic, error)
func (*Anthropic) Generate ¶
func (cm *Anthropic) Generate(ctx context.Context, messages schema.ChatMessages, optFns ...func(o *schema.GenerateOptions)) (*schema.ModelResult, error)
func (*Anthropic) InvocationParams ¶ added in v0.0.27
type AnthropicOptions ¶
type AzureOpenAIOptions ¶ added in v0.0.26
type AzureOpenAIOptions struct { OpenAIOptions Deployment string }
type Fake ¶ added in v0.0.14
func (*Fake) Generate ¶ added in v0.0.14
func (cm *Fake) Generate(ctx context.Context, messages schema.ChatMessages, optFns ...func(o *schema.GenerateOptions)) (*schema.ModelResult, error)
func (*Fake) InvocationParams ¶ added in v0.0.27
type OpenAI ¶
func NewAzureOpenAI ¶ added in v0.0.26
func NewAzureOpenAI(apiKey, baseURL string, optFns ...func(o *AzureOpenAIOptions)) (*OpenAI, error)
func (*OpenAI) Generate ¶
func (cm *OpenAI) Generate(ctx context.Context, messages schema.ChatMessages, optFns ...func(o *schema.GenerateOptions)) (*schema.ModelResult, error)
func (*OpenAI) InvocationParams ¶ added in v0.0.27
type OpenAIOptions ¶
type OpenAIOptions struct { *schema.CallbackOptions schema.Tokenizer // Model name to use. ModelName string // Sampling temperature to use. Temperatur float32 // The maximum number of tokens to generate in the completion. // -1 returns as many tokens as possible given the prompt and //the models maximal context size. MaxTokens int // Total probability mass of tokens to consider at each step. TopP float32 // Penalizes repeated tokens. PresencePenalty float32 // Penalizes repeated tokens according to frequency. FrequencyPenalty float32 // How many completions to generate for each prompt. N int // Batch size to use when passing multiple documents to generate. BatchSize int }
Click to show internal directories.
Click to hide internal directories.