anthropic

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

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