config

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoConfigFound = errors.New("config file or not found")

ErrNoConfigFound config file not found

Functions

This section is empty.

Types

type App

type App struct {
	PathOverride string `toml:"pathOverride"`
	Debug        bool   `toml:"debug"`
	Professor    ProfessorConfig
}

App holds the application configuration

func New

func New(configPath string) (App, error)

New returns a new app's config.

func NewDefault

func NewDefault() (App, error)

NewDefault returns a default App.

func (App) GetPath

func (a App) GetPath() string

type OpenAISourceConfig

type OpenAISourceConfig struct {
	ApiKey       string `toml:"key"`
	CustomPrompt string `toml:"customPrompt"`
	Url          string `toml:"url"`
	Model        string `toml:"model"`
}

OpenAISourceConfig holds the configuration for setting the OpenAI professor source.

type ProfessorConfig

type ProfessorConfig struct {
	Enabled bool                `toml:"enabled"`
	Type    ProfessorSourceType `toml:"type"`
	OpenAI  OpenAISourceConfig  `toml:"openai"`
}

ProfessorConfig is the config for the Professor feature.

type ProfessorSourceType

type ProfessorSourceType string

ProfessorSourceType type for the professor source implementation.

const (
	// OpenAISourceType used for setting OpenAI as the professor source.
	OpenAISourceType ProfessorSourceType = "openai"
)

Jump to

Keyboard shortcuts

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