Skip to content

Fix Custom OpenAI settings #1051

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ class CustomServiceListForm(
private val tabbedPane: JTabbedPane
private val exportButton: JButton
private val importButton: JButton
private var disableTemplateSelectionHandler = false

init {
val selectedItem = formState.value.services.first()
Expand All @@ -112,6 +113,9 @@ class CustomServiceListForm(
}
nameField.text = selectedItem.name
templateComboBox.addItemListener {
if (disableTemplateSelectionHandler) {
return@addItemListener
}
val template = it.item as CustomServiceTemplate
updateTemplateHelpTextTooltip(template)
chatCompletionsForm.run {
Expand Down Expand Up @@ -161,7 +165,9 @@ class CustomServiceListForm(
}
apiKeyField.text = selectedItem.apiKey
nameField.text = selectedItem.name
disableTemplateSelectionHandler = true
templateComboBox.selectedItem = selectedItem.template
disableTemplateSelectionHandler = false
updateTemplateHelpTextTooltip(selectedItem.template)
}

Expand Down