registry

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDefaults

func GetDefaults(name string) (config.ProviderSettings, bool)

GetDefaults returns defaults for a provider if registered.

func Has

func Has(name string) bool

Has reports whether a provider is registered.

func Names

func Names() []string

Names returns a snapshot of registered provider names.

func Register

func Register(name string, f Factory)

Register adds a provider factory under the given name.

func RegisterDefaults

func RegisterDefaults(name string, ps config.ProviderSettings)

RegisterDefaults sets the default settings for a provider.

func RequiresAPIKey

func RequiresAPIKey(name string) bool

RequiresAPIKey reports whether the provider requires an API key.

func SetRequiresAPIKey

func SetRequiresAPIKey(name string, req bool)

SetRequiresAPIKey marks whether a provider requires an API key.

Types

type Factory

type Factory func(ctx context.Context, name string, ps config.ProviderSettings) (ai.AIClient, error)

Factory constructs an AI client for a provider using the given settings.

func Get

func Get(name string) (Factory, bool)

Get returns the factory for name if registered.

Jump to

Keyboard shortcuts

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