Skip to content

Commit 592ed08

Browse files
committed
Hotfix Engine Selection Component
1 parent 77ce255 commit 592ed08

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

presentation/src/main/java/com/shifthackz/aisdv1/presentation/widget/input/GenerationInputForm.kt

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -139,20 +139,22 @@ fun GenerationInputForm(
139139
}
140140

141141
Column(modifier = modifier) {
142-
if (state.mode == ServerSource.OPEN_AI) {
143-
DropdownTextField(
142+
when (state.mode) {
143+
ServerSource.AUTOMATIC1111,
144+
ServerSource.STABILITY_AI,
145+
ServerSource.HUGGING_FACE -> EngineSelectionComponent(
146+
modifier = Modifier
147+
.fillMaxWidth()
148+
.padding(top = 8.dp),
149+
)
150+
ServerSource.OPEN_AI -> DropdownTextField(
144151
modifier = Modifier.padding(top = 8.dp),
145152
label = R.string.hint_model_open_ai.asUiText(),
146153
value = state.openAiModel,
147154
items = OpenAiModel.entries,
148155
onItemSelected = { processIntent(GenerationMviIntent.Update.OpenAi.Model(it)) },
149156
)
150-
} else {
151-
EngineSelectionComponent(
152-
modifier = Modifier
153-
.fillMaxWidth()
154-
.padding(top = 8.dp),
155-
)
157+
else -> Unit
156158
}
157159
if (state.formPromptTaggedInput) {
158160
ChipTextFieldWithItem(

0 commit comments

Comments
 (0)