models

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Model

type Model struct {
	ID          string `json:"id"`
	DisplayName string `json:"display_name"`
	Provider    string `json:"provider"`
}

Model represents an available LLM model.

type Registry

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

Registry discovers and caches available models from provider APIs.

func NewRegistry

func NewRegistry(claudeAPIKey, mistralAPIKey string, log *slog.Logger) *Registry

NewRegistry creates a model registry with API keys for each provider.

func (*Registry) ListAllModels

func (r *Registry) ListAllModels(ctx context.Context) []Model

ListAllModels returns models from all configured providers, tagged with provider name.

func (*Registry) ListModels

func (r *Registry) ListModels(ctx context.Context, provider string) ([]Model, error)

ListModels returns available models for a provider, using a cached result if fresh.

Jump to

Keyboard shortcuts

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