anthropic

package
v0.0.0-...-4cd4b9b Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package anthropic adapts the official Anthropic Go SDK to Simon's model.Model interface, mirroring Python's simon/models/anthropic.py.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model struct {
	Client   anthropicsdk.Client
	ModelStr string
}

Model calls the Anthropic Messages API.

func New

func New(apiKey, modelName string) *Model

New builds an Anthropic-backed Model.

func NewWithOptions

func NewWithOptions(modelName string, opts ...option.RequestOption) *Model

NewWithOptions builds a Model from raw SDK request options, letting callers (notably tests) override the base URL or HTTP client.

func (*Model) Complete

func (m *Model) Complete(ctx context.Context, messages []model.Message, tools []model.ToolSpec) (response.AgentResponse, error)

Complete implements model.Model.

Jump to

Keyboard shortcuts

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