feat: running in cluster

Signed-off-by: Alex Jones <alexsimonjones@gmail.com>
This commit is contained in:
Alex Jones
2023-04-15 18:05:14 +01:00
parent f0a0c9aebf
commit 3988eb2fd0
9 changed files with 66 additions and 105 deletions

View File

@@ -42,6 +42,14 @@ var ServeCmd = &cobra.Command{
Password: password,
Model: model,
}
configAI.Providers = append(configAI.Providers, *aiProvider)
viper.Set("ai", configAI)
if err := viper.WriteConfig(); err != nil {
color.Red("Error writing config file: %s", err.Error())
os.Exit(1)
}
} else {
color.Red("Error: AI provider not specified in configuration. Please run k8sgpt auth")
os.Exit(1)