Documentation
¶
Index ¶
- func IsDefinedModel(g *genkit.Genkit, name string) bool
- func Model(g *genkit.Genkit, name string) ai.Model
- type Anthropic
- func (a *Anthropic) DefineModel(g *genkit.Genkit, name string, opts *ai.ModelOptions) (ai.Model, error)
- func (a *Anthropic) Init(ctx context.Context) []api.Action
- func (a *Anthropic) ListActions(ctx context.Context) []api.ActionDesc
- func (a *Anthropic) Name() string
- func (a *Anthropic) ResolveAction(atype api.ActionType, id string) api.Action
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsDefinedModel ¶
IsDefinedModel returns whether a model is already defined
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) ListActions ¶
func (a *Anthropic) ListActions(ctx context.Context) []api.ActionDesc
ListActions lists all the actions supported by the Anthropic plugin
func (*Anthropic) ResolveAction ¶
ResolveAction resolves an action with the given name
Click to show internal directories.
Click to hide internal directories.