Fixed not being able to select model
This commit is contained in:
parent
279f35f89b
commit
2735357852
|
@ -77,6 +77,7 @@ void setModel(BuildContext context, Function setState) {
|
||||||
messages = [];
|
messages = [];
|
||||||
}
|
}
|
||||||
model = (usedIndex >= 0) ? modelsReal[usedIndex] : null;
|
model = (usedIndex >= 0) ? modelsReal[usedIndex] : null;
|
||||||
|
chatAllowed = !(model == null);
|
||||||
multimodal = (usedIndex >= 0) ? modal[usedIndex] : false;
|
multimodal = (usedIndex >= 0) ? modal[usedIndex] : false;
|
||||||
if (model != null) {
|
if (model != null) {
|
||||||
prefs?.setString("model", model!);
|
prefs?.setString("model", model!);
|
||||||
|
@ -176,7 +177,9 @@ void setModel(BuildContext context, Function setState) {
|
||||||
.modelDialogAddSteps),
|
.modelDialogAddSteps),
|
||||||
showCloseIcon: true));
|
showCloseIcon: true));
|
||||||
}
|
}
|
||||||
if (!chatAllowed) return;
|
if (!chatAllowed && model != null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
setLocalState(() {
|
setLocalState(() {
|
||||||
usedIndex = selected ? index : -1;
|
usedIndex = selected ? index : -1;
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue