anthropic

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*core.BaseClient
}

Client is an Anthropic (Claude) LLM client.

It implements the core.Client interface and provides access to Anthropic's Claude models (Claude 3 Opus, Sonnet, Haiku, etc.).

The client handles Anthropic-specific API requirements including the anthropic-version header, x-api-key authentication, and Claude's unique message format with separate system prompts.

func NewAnthropic

func NewAnthropic(config core.Config) (*Client, error)

New creates a new Anthropic client

func (*Client) Chat

func (c *Client) Chat(ctx context.Context, messages []core.Message, opts ...core.Option) (*core.Response, error)

Chat performs a non-streaming chat completion

func (*Client) ChatStream

func (c *Client) ChatStream(ctx context.Context, messages []core.Message, opts ...core.Option) (*core.Stream, error)

ChatStream performs a streaming chat completion

Jump to

Keyboard shortcuts

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