config

package
v0.0.0-...-2843bd2 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultConfigPath

func DefaultConfigPath() string

DefaultConfigPath returns the default config file path.

Types

type FastCodeConfig

type FastCodeConfig struct {
	OpenAIAPIKey   string `yaml:"openai_api_key"`
	Model          string `yaml:"model"`
	BaseURL        string `yaml:"base_url"`
	EmbeddingURL   string `yaml:"embedding_url"`   // Separate URL for embedding API
	EmbeddingModel string `yaml:"embedding_model"` // Embedding model name
}

FastCodeConfig holds global configuration loaded from ~/.fastcode/config.yaml.

func Load

func Load() (*FastCodeConfig, error)

Load reads the YAML config file and sets environment variables. Environment variables already set take precedence over the config file.

func LoadFrom

func LoadFrom(path string) (*FastCodeConfig, error)

LoadFrom reads a specific YAML config file and sets environment variables.

Jump to

Keyboard shortcuts

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