Skip to content

Commit f9c4f20

Browse files
committed
feat: when config is openai server the models from Google Vertex AI is forbidden
1 parent 3b9586d commit f9c4f20

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

lib/util/input_submit_util.dart

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -510,12 +510,22 @@ class InputSubmitUtil {
510510
questionInputController.update();
511511
} else if (aiModel.aiType == AiType.bard) {
512512
logger.d("bard type");
513+
if (settingsServerController.defaultServer.provider == "geekerchat") {
514+
oldChatFunction(chatSessionController, chatMessageController,
515+
settingsServerController, questionInputController);
516+
questionInputController.clear();
517+
questionInputController.update();
518+
} else {
519+
errorHander(
520+
chatSessionController,
521+
chatMessageController,
522+
settingsServerController,
523+
questionInputController,
524+
"The current server does not support this model. If you need to use all models, it is recommended to use the Geeker Chat server."
525+
.tr);
526+
}
513527

514528
/// add old bard supported
515-
oldChatFunction(chatSessionController, chatMessageController,
516-
settingsServerController, questionInputController);
517-
questionInputController.clear();
518-
questionInputController.update();
519529
} else {
520530
/// process error
521531
errorHander(

0 commit comments

Comments
 (0)