antropic

package
v0.1.2-beta.1 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EOS = "\x00"
)

Variables

View Source
var (
	ErrAnthropicChat = fmt.Errorf("anthropic chat error")
)

Functions

This section is empty.

Types

type Antropic

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

func New

func New() *Antropic

func (*Antropic) Generate

func (o *Antropic) Generate(ctx context.Context, t *thread.Thread) error

func (*Antropic) WithCache

func (o *Antropic) WithCache(cache *cache.Cache) *Antropic

func (*Antropic) WithMaxTokens

func (o *Antropic) WithMaxTokens(maxTokens int) *Antropic

func (*Antropic) WithModel

func (o *Antropic) WithModel(model string) *Antropic

func (*Antropic) WithStream

func (o *Antropic) WithStream(callbackFn StreamCallbackFn) *Antropic

func (*Antropic) WithTemperature

func (o *Antropic) WithTemperature(temperature float64) *Antropic

type StreamCallbackFn

type StreamCallbackFn func(string)

Jump to

Keyboard shortcuts

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