modelgarden

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2026 License: Apache-2.0 Imports: 15 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AnthropicModels = map[string]ai.ModelOptions{
	"claude-opus-4-7": {
		Label:    "Claude Opus 4.7",
		Supports: &internal.Multimodal,
	},
	"claude-opus-4-6": {
		Label:    "Claude Opus 4.6",
		Supports: &internal.Multimodal,
	},
	"claude-sonnet-4-6": {
		Label:    "Claude Sonnet 4.6",
		Supports: &internal.Multimodal,
	},
	"claude-opus-4-5": {
		Label:    "Claude Opus 4.5",
		Supports: &internal.Multimodal,
	},
	"claude-opus-4-1": {
		Label:    "Claude Opus 4.1",
		Supports: &internal.Multimodal,
	},
	"claude-opus-4": {
		Label:    "Claude Opus 4",
		Supports: &internal.Multimodal,
	},
	"claude-sonnet-4-5": {
		Label:    "Claude Sonnet 4.5",
		Supports: &internal.Multimodal,
	},
	"claude-sonnet-4": {
		Label:    "Claude Sonnet 4",
		Supports: &internal.Multimodal,
	},
	"claude-3-7-sonnet": {
		Label:    "Claude 3.7 Sonnet",
		Supports: &internal.Multimodal,
	},
	"claude-3-5-sonnet-v2": {
		Label:    "Claude 3.5 Sonnet",
		Supports: &internal.Multimodal,
	},
	"claude-haiku-4-5": {
		Label:    "Claude Haiku 4.5",
		Supports: &internal.Multimodal,
	},
	"claude-3-5-haiku": {
		Label:    "Claude 3.5 Haiku",
		Supports: &internal.Multimodal,
	},
	"claude-3-5-sonnet": {
		Label:    "Claude 3.5 Sonnet",
		Supports: &internal.Multimodal,
	},
	"claude-3-sonnet": {
		Label:    "Claude 3 Sonnet",
		Supports: &internal.Multimodal,
	},
	"claude-3-haiku": {
		Label:    "Claude 3 Haiku",
		Supports: &internal.Multimodal,
		Stage:    ai.ModelStageDeprecated,
	},
	"claude-3-opus": {
		Label:    "Claude 3 Opus",
		Supports: &internal.Multimodal,
	},

	"claude-opus-4@20250514": {
		Label:    "Claude Opus 4",
		Supports: &internal.Multimodal,
		Stage:    ai.ModelStageDeprecated,
	},
	"claude-sonnet-4@20250514": {
		Label:    "Claude Sonnet 4",
		Supports: &internal.Multimodal,
		Stage:    ai.ModelStageDeprecated,
	},
	"claude-3-7-sonnet@20250219": {
		Label:    "Claude 3.7 Sonnet",
		Supports: &internal.Multimodal,
		Stage:    ai.ModelStageDeprecated,
	},
	"claude-3-5-sonnet-v2@20241022": {
		Label:    "Claude 3.5 Sonnet",
		Supports: &internal.Multimodal,
		Stage:    ai.ModelStageDeprecated,
	},
	"claude-3-5-sonnet@20240620": {
		Label:    "Claude 3.5 Sonnet",
		Supports: &internal.Multimodal,
		Stage:    ai.ModelStageDeprecated,
	},
	"claude-3-sonnet@20240229": {
		Label:    "Claude 3 Sonnet",
		Supports: &internal.Multimodal,
		Stage:    ai.ModelStageDeprecated,
	},
	"claude-3-haiku@20240307": {
		Label:    "Claude 3 Haiku",
		Supports: &internal.Multimodal,
		Stage:    ai.ModelStageDeprecated,
	},
	"claude-3-opus@20240229": {
		Label:    "Claude 3 Opus",
		Supports: &internal.Multimodal,
		Stage:    ai.ModelStageDeprecated,
	},
}

AnthropicModels is a list of models supported in VertexAI. Keep this list updated since models cannot be dynamically listed if we are authenticating with Google Credentials. Keys must be Vertex AI publisher model IDs, not Anthropic API date-versioned IDs.

View Source
var LlamaModels = map[string]ai.ModelOptions{
	"meta/llama-4-maverick-17b-128e-instruct-maas": {
		Label:    "Llama 4 Maverick 17B 128E Instruct",
		Supports: &internal.Multimodal,
	},
	"meta/llama-4-scout-17b-16e-instruct-maas": {
		Label:    "Llama 4 Scout 17B 16E Instruct",
		Supports: &internal.Multimodal,
	},
	"meta/llama-3.3-70b-instruct-maas": {
		Label:    "Llama 3.3 70B Instruct",
		Supports: &internal.BasicText,
	},
}

LlamaModels lists the Meta Llama models available through Vertex AI Model Garden as Model-as-a-Service (MaaS) endpoints. These models are served via an OpenAI-compatible API.

Functions

func AnthropicModel

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

AnthropicModel returns the ai.Model with the given id. It returns nil if the model was not defined

func LlamaModel added in v1.9.0

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

LlamaModel returns the Llama ai.Model with the given id, or nil if it was not defined.

Types

type Anthropic

type Anthropic struct {
	ProjectID string // Google Cloud project to use for Vertex AI. If empty, the value of the environment variable GOOGLE_CLOUD_PROJECT or GCLOUD_PROJECT will be consulted in that order
	Location  string // Location of the Vertex AI service. If empty, the value of the environment variable GOOGLE_CLOUD_LOCATION or GOOGLE_CLOUD_REGION will be consulted in that order
	// contains filtered or unexported fields
}

Anthropic is a Genkit plugin for interacting with Anthropic models in Vertex AI Model Garden

func (*Anthropic) DefineModel

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

DefineModel adds the model to the registry

func (*Anthropic) Init

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

Init initializes the VertexAI Model Garden for Anthropic plugin and all its known models. After calling Init, you may call [DefineModel] to create and register any additional models.

func (*Anthropic) Name

func (a *Anthropic) Name() string

Name returns the name of the plugin

type Llama added in v1.9.0

type Llama struct {
	// ProjectID is the Google Cloud project to use for Vertex AI. If empty,
	// the value of the environment variable GOOGLE_CLOUD_PROJECT or
	// GCLOUD_PROJECT will be consulted in that order.
	ProjectID string
	// Location is the Vertex AI location (e.g. "us-central1"). If empty, the
	// value of GOOGLE_CLOUD_LOCATION or GOOGLE_CLOUD_REGION will be
	// consulted.
	Location string
	// contains filtered or unexported fields
}

Llama is a Genkit plugin for interacting with Meta Llama MaaS models in Vertex AI Model Garden. Llama models on Vertex are served via an OpenAI-compatible endpoint (`.../endpoints/openapi`) and authenticated with a Google OAuth2 access token.

func (*Llama) DefineModel added in v1.9.0

func (l *Llama) DefineModel(name string, opts *ai.ModelOptions) (ai.Model, error)

DefineModel adds a Llama model to the registry.

func (*Llama) Init added in v1.9.0

func (l *Llama) Init(ctx context.Context) []api.Action

Init initializes the Vertex AI Model Garden Llama plugin and registers all known Llama MaaS models. After calling Init you may call DefineModel to register additional Llama models.

func (*Llama) Name added in v1.9.0

func (l *Llama) Name() string

Name returns the name of the plugin.

Jump to

Keyboard shortcuts

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