AI语音添加SetAiAnswerStrStr构造函数
authorluozheng <1732036298@qq.com>
Thu, 8 Aug 2024 10:46:10 +0000 (18:46 +0800)
committerluozheng <1732036298@qq.com>
Thu, 8 Aug 2024 10:46:10 +0000 (18:46 +0800)
code/sdk/application/wearable/fd230app/nativeui/aivoice/include/AiVoiceModel.h
code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoiceModel.cpp

index 9990df9..33617b6 100644 (file)
@@ -2,7 +2,7 @@
  * @Author: luozheng 1732036298@qq.com
  * @Date: 2024-06-20 15:14:43
  * @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-08-03 17:45:26
+ * @LastEditTime: 2024-08-08 17:07:30
  * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/aivoice/include/AiVoiceModel.h
  */
 #ifndef AI_VOICE_MODEL_H
@@ -61,6 +61,7 @@ namespace OHOS
         void SetUserQuestionStr(std::string str);
         std::string GetAiAnswerStr(void);
         void SetAiAnswerStrStr(std::string str);
+        void SetAiAnswerStrStr(std::string str,uint8_t type);
 
         // 文件检查和AI状态管理
         void CheckFileAndSendAIIsReady();
index 5853ceb..0619ed0 100644 (file)
@@ -2,7 +2,7 @@
  * @Author: luozheng 1732036298@qq.com
  * @Date: 2024-06-20 15:14:50
  * @LastEditors: luozheng 1732036298@qq.com
- * @LastEditTime: 2024-08-03 17:47:08
+ * @LastEditTime: 2024-08-08 17:07:46
  * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/aivoice/src/AiVoiceModel.cpp
  */
 #include "aivoice/include/AiVoiceModel.h"
@@ -437,6 +437,12 @@ namespace OHOS
         SendMsgToUIService(UI_UPDATE_AI_ANSWER_STR, 0, nullptr, 0);
     }
 
+    void AiVoiceModel::SetAiAnswerStrStr(std::string str,uint8_t type)
+    {
+        aiAnswerStr += str;
+        SendMsgToUIService(UI_UPDATE_AI_ANSWER_STR, 0, nullptr, 0);
+    }
+
     /*清空上次用户问题和Ai回答字符串*/
     void AiVoiceModel::ClearQuestionAndAiAnswerStr(void)
     {