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