mirror of
https://github.com/ddworken/hishtory.git
synced 2025-08-18 18:58:54 +02:00
Ensure the AiCompletionEndpoint field is always initialized
This commit is contained in:
@@ -232,9 +232,6 @@ func handleUpgradedFeatures() error {
|
||||
// AI completion is not yet configured, disable it for upgrades since this is a new feature
|
||||
config.AiCompletion = false
|
||||
}
|
||||
if config.AiCompletionEndpoint == "" {
|
||||
config.AiCompletionEndpoint = "https://api.openai.com/v1/chat/completions"
|
||||
}
|
||||
return hctx.SetConfig(&config)
|
||||
}
|
||||
|
||||
|
@@ -274,6 +274,9 @@ func GetConfig() (ClientConfig, error) {
|
||||
if config.ColorScheme.BorderColor == "" {
|
||||
config.ColorScheme.BorderColor = GetDefaultColorScheme().BorderColor
|
||||
}
|
||||
if config.AiCompletionEndpoint == "" {
|
||||
config.AiCompletionEndpoint = "https://api.openai.com/v1/chat/completions"
|
||||
}
|
||||
return config, nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user