Skip to content

Commit

Permalink
fix(core): openAI custom model not work as expected
Browse files Browse the repository at this point in the history
close #119
  • Loading branch information
ippan committed Mar 27, 2024
1 parent 44d6d79 commit d4eee77
Showing 1 changed file with 4 additions and 4 deletions.
Expand Up @@ -35,11 +35,11 @@ class OpenAIProvider(val project: Project) : LLMProvider {
private val timeout = Duration.ofSeconds(defaultTimeout)
private val openAiVersion: String
get() {
val customModel = AutoDevSettingsState.getInstance().customModel
if(AutoDevSettingsState.getInstance().openAiModel == SELECT_CUSTOM_MODEL) {
AutoDevSettingsState.getInstance().openAiModel = customModel
val model = AutoDevSettingsState.getInstance().openAiModel
if(model == SELECT_CUSTOM_MODEL) {
return AutoDevSettingsState.getInstance().customModel
}
return AutoDevSettingsState.getInstance().openAiModel
return model
}
private val openAiKey: String
get() = AutoDevSettingsState.getInstance().openAiKey
Expand Down

0 comments on commit d4eee77

Please sign in to comment.