From a3146a82d4ce4faea351e244443693f0509f3fd3 Mon Sep 17 00:00:00 2001 From: luozheng <1732036298@qq.com> Date: Fri, 17 Oct 2025 11:43:20 +0800 Subject: [PATCH] =?utf8?q?=E8=A7=A3=E5=86=B3=E8=93=9D=E7=89=99=E5=92=8C4g?= =?utf8?q?=E5=90=8C=E6=97=B6=E8=BF=9E=E6=8E=A5=E7=9A=84=E6=97=B6=E5=80=99?= =?utf8?q?=EF=BC=8C4gai=E6=9C=8D=E5=8A=A1=E5=87=BD=E6=95=B0=E6=9C=AA?= =?utf8?q?=E8=B0=83=E7=94=A8=E9=97=AE=E9=A2=98=EF=BC=8Cn9=E5=92=8C230?= =?utf8?q?=E5=90=8C=E6=97=B6=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../nativeapp/nativeui/aivoice/src/AiVoicePresenter.cpp | 4 ++++ .../n9/nativeapp/nativeui/aivoice/src/AiVoicePresenter.cpp | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/code/sdk/application/wearable/fd230/nativeapp/nativeui/aivoice/src/AiVoicePresenter.cpp b/code/sdk/application/wearable/fd230/nativeapp/nativeui/aivoice/src/AiVoicePresenter.cpp index d0bc2dcd9..161868420 100644 --- a/code/sdk/application/wearable/fd230/nativeapp/nativeui/aivoice/src/AiVoicePresenter.cpp +++ b/code/sdk/application/wearable/fd230/nativeapp/nativeui/aivoice/src/AiVoicePresenter.cpp @@ -462,6 +462,10 @@ namespace OHOS if (!model->GetInit_4gai_task()) { // init_ai_task(AiVoiceModel::GetInstance().GetCurUsing4GAiModelType()); +#ifdef SUPPORT_AI_SERVICE + uapi_init_all_websocket_servers(); + uapi_start_all_websocket_servers(0); // 连接服务器 +#endif model->start_ai4g_connect_timer(); ChangeViewAndLogicOperator(AIVOICE_STARTCHAT_VIEWID, AIVOICE_4GSERVICECON_VIEW); // LOADING } diff --git a/code/sdk/application/wearable/n9/nativeapp/nativeui/aivoice/src/AiVoicePresenter.cpp b/code/sdk/application/wearable/n9/nativeapp/nativeui/aivoice/src/AiVoicePresenter.cpp index b40ef86b9..8c5b80028 100644 --- a/code/sdk/application/wearable/n9/nativeapp/nativeui/aivoice/src/AiVoicePresenter.cpp +++ b/code/sdk/application/wearable/n9/nativeapp/nativeui/aivoice/src/AiVoicePresenter.cpp @@ -461,7 +461,11 @@ namespace OHOS } if (!model->GetInit_4gai_task()) { - // init_ai_task(AiVoiceModel::GetInstance().GetCurUsing4GAiModelType()); +// init_ai_task(AiVoiceModel::GetInstance().GetCurUsing4GAiModelType()); +#ifdef SUPPORT_AI_SERVICE + uapi_init_all_websocket_servers(); + uapi_start_all_websocket_servers(0); // 连接服务器 +#endif model->start_ai4g_connect_timer(); ChangeViewAndLogicOperator(AIVOICE_STARTCHAT_VIEWID, AIVOICE_4GSERVICECON_VIEW); // LOADING } -- 2.17.1