Documentation ¶
Overview ¶
Package anthropic is the anthropic llm provider, see https://docs.anthropic.com
Index ¶
- Constants
- type Provider
- func (p *Provider) GetChatCompletions(ctx context.Context, req openai.ChatCompletionRequest, _ metadata.M) (openai.ChatCompletionResponse, error)
- func (p *Provider) GetChatCompletionsStream(ctx context.Context, req openai.ChatCompletionRequest, _ metadata.M) (provider.ResponseRecver, error)
- func (p *Provider) Name() string
Constants ¶
View Source
const (
// DefaultMaxTokens is the default max tokens for completion
DefaultMaxTokens = 2048
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Provider ¶
Provider is the provider for anthropic models
func NewProvider ¶
NewProvider creates a new anthropic provider
func (*Provider) GetChatCompletions ¶
func (p *Provider) GetChatCompletions( ctx context.Context, req openai.ChatCompletionRequest, _ metadata.M, ) (openai.ChatCompletionResponse, error)
GetChatCompletions implements ai.LLMProvider.
func (*Provider) GetChatCompletionsStream ¶
func (p *Provider) GetChatCompletionsStream( ctx context.Context, req openai.ChatCompletionRequest, _ metadata.M) (provider.ResponseRecver, error)
GetChatCompletionsStream implements ai.LLMProvider.
Click to show internal directories.
Click to hide internal directories.