mirror of
https://github.com/carlrobertoh/ProxyAI.git
synced 2026-04-29 04:00:46 +00:00
Make it clear that you.com is free in case people run out of OpenAI credits (#238)
* Make it clear that you.com is free in case people run out of OpenAI credits * Clear quota exceeded flag on new api key, minor refactoring --------- Co-authored-by: Carl-Robert Linnupuu <carlrobertoh@gmail.com>
This commit is contained in:
parent
41b3956bf4
commit
4519b2ade6
7 changed files with 36 additions and 9 deletions
|
|
@ -69,6 +69,11 @@ public class SettingsConfigurable implements Configurable {
|
|||
var modelChanged = openAISettings.getModel().equals(serviceSelectionForm.getOpenAIModel()) ||
|
||||
azureSettings.getModel().equals(serviceSelectionForm.getAzureModel());
|
||||
|
||||
var prevKey = OpenAICredentialsManager.getInstance().getApiKey();
|
||||
if (prevKey != null && !prevKey.equals(serviceSelectionForm.getOpenAIApiKey())) {
|
||||
OpenAISettingsState.getInstance().setOpenAIQuotaExceeded(false);
|
||||
}
|
||||
|
||||
OpenAICredentialsManager.getInstance().setApiKey(serviceSelectionForm.getOpenAIApiKey());
|
||||
AzureCredentialsManager.getInstance().setApiKey(serviceSelectionForm.getAzureOpenAIApiKey());
|
||||
AzureCredentialsManager.getInstance()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue