anthropic

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 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 added in v0.10.0

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 []openai.Message, opts openai.Options, ch chan<- openai.StreamEvent)

Jump to

Keyboard shortcuts

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