data

package
v2.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

View Source
const (
	API        string = "https://api.anthropic.com/v1/complete"
	UserAgent  string = "" /* 163-byte string literal not displayed */
	SDKVersion string = "2.1.0"
)
View Source
const (
	ModelMajorInstant      string = "claude-instant-1"
	ModelMajorClaude       string = "claude-2"
	ModelFullInstant       string = "claude-instant-1.2"
	ModelFullClaude        string = "claude-2.1"
	ModelFullClaude3Sonnet string = "claude-3-sonnet-20240229"
	ModelFullClaude3Opus   string = "claude-3-opus-20240229"
	ModelFullClaude3Haiku  string = "claude-3-haiku-20240307"
)

latest model

View Source
const (
	Model_MajorClaude_1       string = "claude-v1"
	Model_MajorClaude_1_Big   string = "claude-v1-100k"
	Model_FullClaude_1_0      string = "claude-v1.0"
	Model_FullClaude_1_2      string = "claude-v1.2"
	Model_FullClaude_1_3      string = "claude-v1.3"
	Model_FullClaude_1_3_Big  string = "claude-v1.3-100k"
	Model_MajorInstant_1      string = "claude-instant-v1"
	Model_MajorInstant_1_Big  string = "claude-instant-v1-100k"
	Model_FullInstant_1_0     string = "claude-instant-v1.0"
	Model_FullInstant_1_1     string = "claude-instant-1.1"
	Model_FullInstant_1_1_Big string = "claude-instant-v1.1-100k"
	Model_FullClaude_2_0      string = "claude-2.0"
)

old model (Availability not guaranteed)

Variables

View Source
var (
	ErrApiKeyEmpty      = errors.New("apikey cannot be empty")
	ErrRegionBanned     = errors.New("region blocked")
	ErrClientIsNil      = errors.New("client cannot be nil")
	ErrSessionIsNil     = errors.New("session cannot be nil")
	ErrSessionNotFound  = errors.New("session not found")
	ErrConfigIsNil      = errors.New("configuration cannot be nil")
	ErrSenderIsNil      = errors.New("sender cannot be nil")
	ErrPromptHumanEmpty = errors.New("the value of human cannot be empty")
	ErrPromptCtxEmpty   = errors.New("the value of session cannot be empty")
	ErrPromptEmpty      = errors.New("the value of prompt cannot be empty")
)
View Source
var Client = &fasthttp.Client{
	NoDefaultUserAgentHeader:      true,
	DisableHeaderNamesNormalizing: false,
	Dial:                          dialer(),
}
View Source
var StopSequences []string = []string{"\n\nHuman:"}

Functions

This section is empty.

Types

type MessageModule

type MessageModule struct {
	Assistant string // returned data (do not modify)
	Human     string // input content
}

Chunked message structure

Jump to

Keyboard shortcuts

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