添加DISABLE_AI_VALID_QUERY宏,控制是否需要查询AI服务器是否有效,默认开启查询。 651/1 651/head
authorSnickerSun <snickersun@163.com>
Tue, 6 Aug 2024 10:17:26 +0000 (18:17 +0800)
committerSnickerSun <snickersun@163.com>
Tue, 6 Aug 2024 10:17:26 +0000 (18:17 +0800)
code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoicePresenter.cpp

index 9b1b97a..6a61319 100644 (file)
@@ -1,8 +1,8 @@
 /*
  * @Author: luozheng 1732036298@qq.com
  * @Date: 2024-06-20 15:11:17
- * @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-08-03 17:48:50
+ * @LastEditors: SnickerSun snickersun@163.com
+ * @LastEditTime: 2024-08-06 17:40:32
  * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoicePresenter.cpp
  */
 #include "AppViewIDs.h"
@@ -269,7 +269,12 @@ namespace OHOS
             else if (appBluetoothConnectState) // 3.只有与APP蓝牙连接正常
             {
                 // 通过蓝牙连接APP调用大模型
+#ifdef DISABLE_AI_VALID_QUERY
+                ChangeViewAndLogicOperator(AIVOICE_STARTCHAT_VIEWID, AIVOICE_LISTENING_VIEWID);
+                model->SetAiVoiceConnectStatus(true);
+#else
                 ChangeViewAndLogicOperator(AIVOICE_STARTCHAT_VIEWID, AIVOICE_AIMODE_CONNECTING); // LOADING
+#endif
             }
             else // 4.两者连接都异常
             {