config

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Defaults     Defaults   `yaml:"defaults"`
	Providers    []Provider `yaml:"providers"`
	BaselinePath string     `yaml:"baseline"`
}

func Load

func Load(path string) (*Config, error)

type Defaults

type Defaults struct {
	Prompt      string   `yaml:"prompt"`
	MaxTokens   int      `yaml:"max_tokens"`
	Timeout     Duration `yaml:"timeout"`
	Concurrency int      `yaml:"concurrency"`
}

type Duration

type Duration struct {
	time.Duration
}

func (Duration) MarshalYAML

func (d Duration) MarshalYAML() (interface{}, error)

func (*Duration) UnmarshalYAML

func (d *Duration) UnmarshalYAML(value *yaml.Node) error

type Model

type Model struct {
	Name           string     `yaml:"name"`
	Prompt         string     `yaml:"prompt"`
	MaxTokens      int        `yaml:"max_tokens"`
	ResponseFormat string     `yaml:"response_format"`
	ValidateJSON   bool       `yaml:"validate_json"`
	Thresholds     Thresholds `yaml:"thresholds"`
}

type Provider

type Provider struct {
	Name       string  `yaml:"name"`
	Label      string  `yaml:"label"`
	APIKey     string  `yaml:"api_key"`
	BaseURL    string  `yaml:"base_url"`
	Models     []Model `yaml:"models"`
	APIVersion string  `yaml:"api_version"`
	Region     string  `yaml:"region"`
	AccessKey  string  `yaml:"access_key"`
	SecretKey  string  `yaml:"secret_key"`
}

func (Provider) DisplayName added in v1.2.0

func (p Provider) DisplayName() string

type Thresholds

type Thresholds struct {
	MaxTTFT              Duration `yaml:"max_ttft"`
	MaxLatency           Duration `yaml:"max_latency"`
	MinTokensPerS        float64  `yaml:"min_tokens_per_sec"`
	MaxTTFTMultiplier    float64  `yaml:"max_ttft_multiplier"`
	MaxLatencyMultiplier float64  `yaml:"max_latency_multiplier"`
}

Jump to

Keyboard shortcuts

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