anthropic

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 29, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultMaxTokens       = 8192
	MaxToolResolutionDepth = 10
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Anthropic

type Anthropic struct {
	// contains filtered or unexported fields
}

func New

func New(llmService llm.ServiceConfig, httpClient *http.Client, metricsService metrics.LLMetrics) *Anthropic

func (*Anthropic) ChatCompletion

func (a *Anthropic) ChatCompletion(conversation llm.BotConversation, opts ...llm.LanguageModelOption) (*llm.TextStreamResult, error)

func (*Anthropic) ChatCompletionNoStream

func (a *Anthropic) ChatCompletionNoStream(conversation llm.BotConversation, opts ...llm.LanguageModelOption) (string, error)

func (*Anthropic) CountTokens

func (a *Anthropic) CountTokens(text string) int

func (*Anthropic) GetDefaultConfig

func (a *Anthropic) GetDefaultConfig() llm.LanguageModelConfig

func (*Anthropic) InputTokenLimit

func (a *Anthropic) InputTokenLimit() int

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL