config

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig = Config{
	Version: "1.8.1",
	Theme:   "dracula",
	RAG:     true,
	AIProviderConfig: &providers.AIProviderConfig{
		ChatProviderName:       "openai",
		EmbeddingsProviderName: "openai",
		ChatBaseURL:            "https://api.openai.com",
		EmbeddingsBaseURL:      "https://api.openai.com",
		ChatModel:              "gpt-4o",
		EmbeddingsModel:        "text-embedding-3-small",
		Stream:                 true,
		EncodingFormat:         "float",
		Temperature:            0.2,
		Threshold:              0,
		ChatApiVersion:         "",
		EmbeddingsApiVersion:   "",
		ChatApiKey:             "",
		EmbeddingsApiKey:       "",
	},
}

DefaultConfig values

Functions

func InitFlags

func InitFlags(rootCmd *cobra.Command)

InitFlags initializes the flags for the root command.

Types

type Config

type Config struct {
	Version          string                      `mapstructure:"version"`
	Theme            string                      `mapstructure:"theme"`
	RAG              bool                        `mapstructure:"rag"`
	AIProviderConfig *providers.AIProviderConfig `mapstructure:"ai_provider_config"`
}

Config represents the structure of the configuration file

func LoadConfigs

func LoadConfigs(rootCmd *cobra.Command, cwd string) *Config

LoadConfigs initializes the configuration from file, flags, and environment variables, and returns the final config.

Jump to

Keyboard shortcuts

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