grokkit/config/config.go

19 lines
388 B
Go
Raw Normal View History

2026-02-28 19:56:23 +00:00
package config
import (
"os"
"github.com/spf13/viper"
)
func InitConfig() {
viper.SetConfigName("grokkit")
viper.SetConfigType("yaml")
home, _ := os.UserHomeDir()
viper.AddConfigPath(home + "/.config/grokkit")
viper.SetDefault("model", "grok-4")
viper.SetDefault("chat.history_file", home+"/.config/grokkit/chat_history.json")
viper.AutomaticEnv()
_ = viper.ReadInConfig()
}