Browse Source

计时器

11wqe1 1 week ago
parent
commit
13bbaa7cb0
1 changed files with 39 additions and 9 deletions
  1. 39 9
      src/components/classRoomHelper/component/countdown.vue

+ 39 - 9
src/components/classRoomHelper/component/countdown.vue

@@ -1523,6 +1523,17 @@ export default {
         }
       }
     },
+    getLang() {
+      let lang = "";
+      if (this.lang.lang == 'cn') {
+        lang = "Chinese.";
+      } else if (this.lang.lang == 'hk') {
+        lang = "Traditional Chinese.";
+      } else if (this.lang.lang == 'com') {
+        lang = "English.";
+      }
+      return lang;
+    },
     getBehaviorTagMore() {
       this.behaviorTagMoreLoading = true;
       let _textData = `课程名称:${this.courseDetail.title}\n分类:${this.courseDetail.name}\n\n`;
@@ -1539,18 +1550,37 @@ export default {
         });
         _textData += "\n";
       });
-      let _msg = `Language: Please use the same language as the user requirement, if the user speaks Chinese, the specific text of your answer should also be in Chinese.
-ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenced "Format example".
-Instruction: Based on the context, follow "Format example", write content
+      // 根据语言生成任务描述和格式示例
+      let taskDescription = "";
+      let formatExample = "";
+      
+      if (this.lang.lang == 'cn') {
+        taskDescription = "在以下课堂中,如果老师设置一个倒计时,他可能想开展哪些教学活动?每个教学活动使用4个字,进行简洁精确的描述,请返回所有可能的行为名称,不需要额外的解释。请返回最有可能的12个活动类型。";
+        formatExample = '["小组汇报","小组讨论","动手实验","课堂游戏","自主学习","作品展示","学生演讲","学生分享","随堂练习","快速问答","阅读资料","观察记录"]';
+      } else if (this.lang.lang == 'hk') {
+        taskDescription = "在以下課堂中,如果老師設置一個倒計時,他可能想開展哪些教學活動?每個教學活動使用4個字,進行簡潔精確的描述,請返回所有可能的行為名稱,不需要額外的解釋。請返回最有可能的12個活動類型。";
+        formatExample = '["小組匯報","小組討論","動手實驗","課堂遊戲","自主學習","作品展示","學生演講","學生分享","隨堂練習","快速問答","閱讀資料","觀察記錄"]';
+      } else if (this.lang.lang == 'com') {
+        taskDescription = "In the following classroom context, if a teacher sets a countdown timer, what teaching activities might they want to conduct? Each teaching activity should be described in 4 words (or short phrases), be concise and precise. Return all possible activity names without additional explanations. Return the 12 most likely activity types.";
+        formatExample = '["Group Report","Group Discussion","Hands-on Experiment","Classroom Game","Independent Learning","Work Display","Student Speech","Student Share","Class Practice","Quick Q&A","Reading Materials","Observation Record"]';
+      }
+
+      let _msg = `## Language Requirement
+CRITICAL: You MUST respond in ${this.getLang()} All output content, including activity names in the array, must be in ${this.getLang()}
+
+## ATTENTION
+Use '##' to SPLIT SECTIONS, not '#'. Output format must strictly follow the "Format example".
+
+## Instruction
+Based on the context provided, follow the "Format example" format and write content. IMPORTANT: All activity names in your response must be in ${this.getLang()}
 
-#Context
-##任务
-在以下课堂中,如果老师设置一个倒计时,他可能想开展哪些教学活动?每个教学活动使用4个字,进行简洁精确的描述,请返回所有可能的行为名称,不需要额外的解释。请返回最有可能的12个活动类
+## Task
+${taskDescription}
 
-##Format example
-["小组汇报","小组汇报","小组汇报","小组汇报","小组汇报","小组汇报","小组汇报","小组汇报","小组汇报","小组汇报","小组汇报","小组汇报"]
+## Format example
+${formatExample}
 
-##课堂内容
+## Context
 ${_textData}
 `;