From e9c273c705455c8dd8e2aa6eb3b27791e9dd362f Mon Sep 17 00:00:00 2001 From: luozheng <1732036298@qq.com> Date: Wed, 26 Nov 2025 15:24:04 +0800 Subject: [PATCH] =?utf8?q?n9=EF=BC=9Auapi=5Fstart=5Fall=5Fwebsocket=5Fserv?= =?utf8?q?ers=E6=A0=B9=E6=8D=AE=E5=BD=93=E5=89=8D=E6=A8=A1=E5=9E=8B?= =?utf8?q?=E4=BC=A0=E5=85=A5=E5=AF=B9=E5=BA=94=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- .../nativeui/aivoice/src/AiVoiceModel.cpp | 14 +++++++------- .../nativeui/aivoice/src/AiVoicePresenter.cpp | 6 +++--- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/code/sdk/application/wearable/n9/nativeapp/nativeui/aivoice/src/AiVoiceModel.cpp b/code/sdk/application/wearable/n9/nativeapp/nativeui/aivoice/src/AiVoiceModel.cpp index 523f244c7..b44167ec3 100644 --- a/code/sdk/application/wearable/n9/nativeapp/nativeui/aivoice/src/AiVoiceModel.cpp +++ b/code/sdk/application/wearable/n9/nativeapp/nativeui/aivoice/src/AiVoiceModel.cpp @@ -212,15 +212,15 @@ namespace OHOS uint8_t AiVoiceModel::GetCurUsing4GAiModelType(void) { -#if AI_VOICE_ENABLE +#if 1 int value = GetSelectAiModel(); std::map> selectAiModelToAiModelType = { - {0, {STR_DEEPSEEK, AI_TYPE_DE}}, - {1, {STR_JIUTIAN, AI_TYPE_JIU}}, - {2, {STR_AIMODELS_DOUBAO, AI_TYPE_DOU}}, - {3, {STR_AIMODES_WENXINYIYAN, AI_TYPE_WEN}}, - {4, {STR_AIMODES_KIMI, AI_TYPE_KIMI}}, - {5, {STR_AIMODES_CHATGPT, AI_TYPE_0}}, + {0, {STR_DEEPSEEK, 5}}, + {1, {STR_JIUTIAN, 1}}, + {2, {STR_AIMODELS_DOUBAO, 2}}, + {3, {STR_AIMODES_WENXINYIYAN, 3}}, + {4, {STR_AIMODES_KIMI, 4}}, + {5, {STR_AIMODES_CHATGPT, 5}}, }; WEARABLE_LOGE(WEARABLE_LOG_MODULE_APP, "GetCurUsing4GAiModelType = %d", selectAiModelToAiModelType[value].second); 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 8c5b80028..e1e0f93de 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 @@ -464,7 +464,7 @@ namespace OHOS // init_ai_task(AiVoiceModel::GetInstance().GetCurUsing4GAiModelType()); #ifdef SUPPORT_AI_SERVICE uapi_init_all_websocket_servers(); - uapi_start_all_websocket_servers(0); // 连接服务器 + uapi_start_all_websocket_servers(AiVoiceModel::GetInstance().GetCurUsing4GAiModelType()); // 连接服务器 #endif model->start_ai4g_connect_timer(); ChangeViewAndLogicOperator(AIVOICE_STARTCHAT_VIEWID, AIVOICE_4GSERVICECON_VIEW); // LOADING @@ -501,7 +501,7 @@ namespace OHOS // init_ai_task(AiVoiceModel::GetInstance().GetCurUsing4GAiModelType()); #ifdef SUPPORT_AI_SERVICE uapi_init_all_websocket_servers(); - uapi_start_all_websocket_servers(0); // 连接服务器 + uapi_start_all_websocket_servers(AiVoiceModel::GetInstance().GetCurUsing4GAiModelType()); // 连接服务器 #endif /* -------------------------------------------------------------------------- */ model->start_ai4g_connect_timer(); @@ -545,7 +545,7 @@ namespace OHOS // init_ai_task(AiVoiceModel::GetInstance().GetCurUsing4GAiModelType()); #ifdef SUPPORT_AI_SERVICE uapi_init_all_websocket_servers(); - uapi_start_all_websocket_servers(0); // 连接服务器 + uapi_start_all_websocket_servers(AiVoiceModel::GetInstance().GetCurUsing4GAiModelType()); // 连接服务器 #endif model->start_ai4g_connect_timer(); ChangeViewAndLogicOperator(model->GetCurView(), AIVOICE_4GSERVICECON_VIEW); // LOADING -- 2.17.1