claude

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2025 License: Apache-2.0 Imports: 10 Imported by: 5 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClaudeProvider

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

ClaudeProvider implements the Provider interface for Anthropic Claude

func NewClaudeProvider

func NewClaudeProvider(id, model, baseURL string, defaults providers.ProviderDefaults, includeRawOutput bool) *ClaudeProvider

NewClaudeProvider creates a new Claude provider

func (*ClaudeProvider) CalculateCost

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

CalculateCost calculates detailed cost breakdown including optional cached tokens

func (*ClaudeProvider) GetMultimodalCapabilities

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

GetMultimodalCapabilities returns Claude's multimodal support capabilities

func (*ClaudeProvider) Predict

Predict sends a predict request to Claude

func (*ClaudeProvider) PredictMultimodal

PredictMultimodal sends a multimodal predict request to Claude

func (*ClaudeProvider) PredictMultimodalStream

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

PredictMultimodalStream sends a streaming multimodal predict request to Claude

func (*ClaudeProvider) PredictStream

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

PredictStream streams a predict response from Claude

type ClaudeToolProvider

type ClaudeToolProvider struct {
	*ClaudeProvider
}

ClaudeToolProvider extends ClaudeProvider with tool support

func NewClaudeToolProvider

func NewClaudeToolProvider(id, model, baseURL string, defaults providers.ProviderDefaults, includeRawOutput bool) *ClaudeToolProvider

NewClaudeToolProvider creates a new Claude provider with tool support

func (*ClaudeToolProvider) BuildTooling

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

BuildTooling converts tool descriptors to Claude format

func (*ClaudeToolProvider) PredictWithTools

func (p *ClaudeToolProvider) 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