config

package
v0.0.0-...-8ea316f Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFromEnv

func NewFromEnv(cfg *Config) error

func NewFromFile

func NewFromFile(file string, cfg *Config) error

Types

type Config

type Config struct {
	Logger LoggerConfig `toml:"logger"`
	OpenAI OpenAIConfig `toml:"openai"`
	Server ServerConfig `toml:"server"`
}

type LoggerConfig

type LoggerConfig struct {
	Level   string `toml:"level"`
	Concise bool   `toml:"concise"`
}

type OpenAIConfig

type OpenAIConfig struct {
	ApiKey       string `toml:"api_key"`
	MaxTokens    int    `toml:"max_tokens"`
	SystemPrompt string `toml:"system_prompt"`
}

type ServerConfig

type ServerConfig struct {
	Port int `toml:"port"`
}

Jump to

Keyboard shortcuts

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