config

package
v0.0.0-...-337008c Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnvDev  = "dev"
	EnvTest = "test"
	EnvProd = "prod"
)

Variables

This section is empty.

Functions

func IsProd

func IsProd() bool

func Load

func Load(filename string)

Types

type Account

type Account struct {
	Passes []string `yaml:"passes"`
}

type Config

type Config struct {
	Env     string  `yaml:"env"`
	Port    uint16  `yaml:"port"`
	MainDB  MySQL   `yaml:"main_db"`
	LLM     LLM     `yaml:"llm"`
	Account Account `yaml:"account"`
}

func Get

func Get() *Config

type LLM

type LLM struct {
	OpenAIAPIKey       string   `yaml:"open_ai_api_key"`
	OpenAIModelName    string   `json:"open_ai_model_name"`
	EmbeddingModelName string   `yaml:"embedding_model_name"`
	VectorDBHost       string   `yaml:"vector_db_host"`
	RedisVector        VectorDB `yaml:"redis_vector"`
}

type MySQL

type MySQL struct {
	DSN string `yaml:"dsn"`
}

type VectorDB

type VectorDB struct {
	Scheme string `yaml:"scheme"`
	Host   string `yaml:"host"`
	Index  string `yaml:"index"`
}

Jump to

Keyboard shortcuts

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