claude

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2025 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Overview

Package claude provides Anthropic Claude LLM provider integration.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider added in v1.1.3

type Provider struct {
	providers.BaseProvider
	// contains filtered or unexported fields
}

Provider implements the Provider interface for Anthropic Claude

func NewProvider added in v1.1.3

func NewProvider(id, model, baseURL string, defaults providers.ProviderDefaults, includeRawOutput bool) *Provider

NewProvider creates a new Claude provider

func (*Provider) CalculateCost added in v1.1.3

func (p *Provider) CalculateCost(tokensIn, tokensOut, cachedTokens int) types.CostInfo

CalculateCost calculates detailed cost breakdown including optional cached tokens

func (*Provider) GetMultimodalCapabilities added in v1.1.3

func (p *Provider) GetMultimodalCapabilities() providers.MultimodalCapabilities

GetMultimodalCapabilities returns Claude's multimodal support capabilities

func (*Provider) Predict added in v1.1.3

Predict sends a predict request to Claude

func (*Provider) PredictMultimodal added in v1.1.3

PredictMultimodal sends a multimodal predict request to Claude

func (*Provider) PredictMultimodalStream added in v1.1.3

func (p *Provider) PredictMultimodalStream(ctx context.Context, req providers.PredictionRequest) (<-chan providers.StreamChunk, error)

PredictMultimodalStream sends a streaming multimodal predict request to Claude

func (*Provider) PredictStream added in v1.1.3

func (p *Provider) PredictStream(ctx context.Context, req providers.PredictionRequest) (<-chan providers.StreamChunk, error)

PredictStream streams a predict response from Claude

type ToolProvider added in v1.1.3

type ToolProvider struct {
	*Provider
}

ToolProvider extends ClaudeProvider with tool support

func NewToolProvider added in v1.1.3

func NewToolProvider(id, model, baseURL string, defaults providers.ProviderDefaults, includeRawOutput bool) *ToolProvider

NewToolProvider creates a new Claude provider with tool support

func (*ToolProvider) BuildTooling added in v1.1.3

func (p *ToolProvider) BuildTooling(descriptors []*providers.ToolDescriptor) (interface{}, error)

BuildTooling converts tool descriptors to Claude format

func (*ToolProvider) PredictWithTools added in v1.1.3

func (p *ToolProvider) PredictWithTools(ctx context.Context, req providers.PredictionRequest, tools interface{}, toolChoice string) (providers.PredictionResponse, []types.MessageToolCall, error)

PredictWithTools performs a predict request with tool support

Jump to

Keyboard shortcuts

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