generators

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package generators provides the generator interface and implementations for LLM access.

Generators wrap LLM APIs (OpenAI, Anthropic, local models) with a common interface. They handle authentication, rate limiting, and conversation management.

Index

Constants

This section is empty.

Variables

View Source
var Registry = registry.New[Generator]("generators")

Registry is the global generator registry.

Functions

func Get

func Get(name string) (func(registry.Config) (Generator, error), bool)

Get retrieves a generator factory by name.

func List

func List() []string

List returns all registered generator names.

func Register

func Register(name string, factory func(registry.Config) (Generator, error))

Register adds a generator factory to the global registry. Called from init() functions in generator implementations.

Types

type Generator

type Generator = types.Generator

Generator is a type alias for backward compatibility. See types.Generator for the canonical interface definition.

func Create

func Create(name string, cfg registry.Config) (Generator, error)

Create instantiates a generator by name.

Jump to

Keyboard shortcuts

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