providercatalog

package
v0.16.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CatalogURL

func CatalogURL() string

func RefreshFromRemote

func RefreshFromRemote(ctx context.Context, url string) error

func RefreshFromRemoteAsync

func RefreshFromRemoteAsync(url string)

func SetCatalog

func SetCatalog(catalog Catalog)

Types

type Catalog

type Catalog struct {
	UpdatedAt string     `json:"updated_at"`
	Source    string     `json:"source"`
	Providers []Provider `json:"providers"`
}

func Current

func Current() Catalog

type Model

type Model struct {
	ID            string   `json:"id"`
	Name          string   `json:"name,omitempty"`
	Description   string   `json:"description,omitempty"`
	ContextLength int      `json:"context_length,omitempty"`
	Tags          []string `json:"tags,omitempty"`
	InputCost     float64  `json:"input_cost,omitempty"`
	OutputCost    float64  `json:"output_cost,omitempty"`
}

type Provider

type Provider struct {
	ID                  string  `json:"id"`
	Name                string  `json:"name"`
	Description         string  `json:"description,omitempty"`
	SetupHint           string  `json:"setup_hint,omitempty"`
	DocsURL             string  `json:"docs_url,omitempty"`
	SignupURL           string  `json:"signup_url,omitempty"`
	APIKeyLabel         string  `json:"api_key_label,omitempty"`
	APIKeyHelp          string  `json:"api_key_help,omitempty"`
	Recommended         bool    `json:"recommended,omitempty"`
	DefaultModel        string  `json:"default_model,omitempty"`
	RecommendedModel    string  `json:"recommended_model,omitempty"`
	RecommendedModelWhy string  `json:"recommended_model_why,omitempty"`
	Models              []Model `json:"models,omitempty"`
}

func FindProvider

func FindProvider(id string) (Provider, bool)

Jump to

Keyboard shortcuts

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