google

package
v0.39.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package google implements engine.Engine for Google Imagen and Veo APIs.

Image generation via the official Google GenAI SDK. Auth: API key via SDK, env GOOGLE_API_KEY.

Index

Constants

View Source
const (
	ModelImagen3Generate002 = "imagen-3.0-generate-002"
	ModelImagen3Generate001 = "imagen-3.0-generate-001"
)

Model constants.

Variables

View Source
var ErrMissingPrompt = errors.New("google: missing prompt in workflow graph")

Functions

func ConfigSchema

func ConfigSchema() []engine.ConfigField

ConfigSchema returns the configuration fields required by the Google Imagen engine.

func DefaultProvider added in v0.15.0

func DefaultProvider() engine.Provider

DefaultProvider returns preset engine configurations for google.

func ModelInfos added in v0.16.0

func ModelInfos() []engine.ModelInfo

ModelInfos returns i18n metadata for all Google Imagen models.

func ModelsByCapability

func ModelsByCapability() map[string][]string

ModelsByCapability returns all known Google Imagen models grouped by capability.

Types

type Config

type Config struct {
	APIKey     string
	BaseURL    string
	Model      string
	HTTPClient *http.Client
}

Config configures the Google Imagen engine.

type Engine

type Engine struct {
	// contains filtered or unexported fields
}

Engine implements engine.Engine for Google Imagen.

func New

func New(cfg Config) (*Engine, error)

New creates a Google Imagen engine instance.

func (*Engine) Capabilities

func (e *Engine) Capabilities() engine.Capability

Capabilities implements engine.Describer.

func (*Engine) Execute

func (e *Engine) Execute(ctx context.Context, g workflow.Graph) (engine.Result, error)

Execute generates an image via the Google Imagen API.

Jump to

Keyboard shortcuts

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