mirror of
https://github.com/carlrobertoh/ProxyAI.git
synced 2026-05-11 04:50:31 +00:00
Use enum value to store selected service (#265)
This commit is contained in:
parent
ff60d1eab5
commit
cfa5ff7776
12 changed files with 166 additions and 233 deletions
|
|
@ -39,7 +39,7 @@ public class SettingsComponent {
|
|||
cards.add(serviceSelectionForm.getLlamaServiceSectionPanel(), ServiceType.LLAMA_CPP.getCode());
|
||||
var serviceComboBoxModel = new DefaultComboBoxModel<ServiceType>();
|
||||
serviceComboBoxModel.addAll(Arrays.stream(ServiceType.values())
|
||||
.filter(it -> !"LLAMA_CPP".equals(it.getCode()) || SystemInfoRt.isUnix)
|
||||
.filter(it -> ServiceType.LLAMA_CPP != it || SystemInfoRt.isUnix)
|
||||
.collect(toList()));
|
||||
serviceComboBox = new ComboBox<>(serviceComboBoxModel);
|
||||
serviceComboBox.setSelectedItem(ServiceType.OPENAI);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue