anthropic

package
v1.2.1 Latest Latest
Warning

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

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

Documentation

Overview

Package anthropic implements streaming chat through Anthropic's Messages API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateKey

func ValidateKey(key string) error

ValidateKey checks an Anthropic key without generating tokens.

func ValidateKeyAt

func ValidateKeyAt(key, baseURL string) error

func WithBaseURL

func WithBaseURL(url string) option.RequestOption

Types

type Client

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

func New

func New(apiKey string, opts ...option.RequestOption) *Client

func (*Client) StreamChat

func (c *Client) StreamChat(ctx context.Context, model string, messages []chat.Message, opts chat.Options, ch chan<- chat.StreamEvent)

Jump to

Keyboard shortcuts

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