From: luozheng <1732036298@qq.com> Date: Wed, 26 Nov 2025 07:24:04 +0000 (+0800) Subject: n9:uapi_start_all_websocket_servers根据当前模型传入对应参数 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=e9c273c705455c8dd8e2aa6eb3b27791e9dd362f;p=mirrors%2FFD230.git n9:uapi_start_all_websocket_servers根据当前模型传入对应参数 --- 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