claude

package
v0.4.9 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Model      = envOr("relay_MODEL", "claude-opus-4-5")
	MaxTokens  = envInt("relay_MAX_TOKENS", 4096)
	Timeout    = envDuration("relay_TIMEOUT_SECONDS", 120) * time.Second
	MaxRetries = 3
	BaseDelay  = 2 * time.Second
)

Functions

This section is empty.

Types

type Client

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

func New

func New() *Client

func (*Client) Call

func (c *Client) Call(ctx context.Context, system, user string) (string, error)

func (*Client) CallJSON

func (c *Client) CallJSON(ctx context.Context, system, user string, dest any) error

func (*Client) CallWithSearch

func (c *Client) CallWithSearch(ctx context.Context, system, user string) (string, error)

type Error

type Error struct {
	Kind      ErrorKind
	Message   string
	Retryable bool
}

func (*Error) Error

func (e *Error) Error() string

type ErrorKind

type ErrorKind string
const (
	ErrRateLimit ErrorKind = "rate_limit"
	ErrTimeout   ErrorKind = "timeout"
	ErrAPI       ErrorKind = "api_error"
	ErrParseJSON ErrorKind = "parse_error"
)

Jump to

Keyboard shortcuts

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