anthropic

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2026 License: Apache-2.0 Imports: 14 Imported by: 18 modules, 3 packages

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

func IsDefinedModel

func IsDefinedModel(g *genkit.Genkit, name string) bool

IsDefinedModel returns whether a model is already defined

func Model

func Model(g *genkit.Genkit, name string) ai.Model

Model returns a previously registered model

Types

type Anthropic

type Anthropic struct {
	APIKey  string // If not provided, defaults to ANTHROPIC_API_KEY
	BaseURL string // Optional. If not provided, defaults to ANTHROPIC_BASE_URL
	// contains filtered or unexported fields
}

Anthropic is a Genkit plugin for interacting with the Anthropic services

func (*Anthropic) DefineModel

func (a *Anthropic) DefineModel(g *genkit.Genkit, name string, opts *ai.ModelOptions) (ai.Model, error)

DefineModel defines an unknown model with the given name. The second argument describes the capability of the model. Use IsDefinedModel to determine if a model is already defined. After [Init] is called, only the known models are defined.

func (*Anthropic) Init

func (a *Anthropic) Init(ctx context.Context) []api.Action

Init initializes the Anthropic plugin and all known models

func (*Anthropic) ListActions

func (a *Anthropic) ListActions(ctx context.Context) []api.ActionDesc

ListActions lists all the actions supported by the Anthropic plugin

func (*Anthropic) Name

func (a *Anthropic) Name() string

Name returns the name of the plugin

func (*Anthropic) ResolveAction

func (a *Anthropic) ResolveAction(atype api.ActionType, id string) api.Action

ResolveAction resolves an action with the given name

Jump to

Keyboard shortcuts

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