mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-08 15:05:17 +02:00
feat: +练习题
This commit is contained in:
parent
16bad64649
commit
7cab03942e
3 changed files with 57 additions and 4 deletions
|
|
@ -39,7 +39,12 @@ class WriteTeachingPlanPart(Action):
|
|||
if len(args) < 1 or len(args[0]) < 1 or not isinstance(args[0][0], Message):
|
||||
raise ValueError("Invalid args, a tuple of List[Message] is expected")
|
||||
|
||||
statements = self.TOPIC_STATEMENTS.get(self.topic, [])
|
||||
statement_patterns = self.TOPIC_STATEMENTS.get(self.topic, [])
|
||||
statements = []
|
||||
from metagpt.roles import Role
|
||||
for p in statement_patterns:
|
||||
s = Role.format_value(p, kwargs)
|
||||
statements.append(s)
|
||||
formatter = self.PROMPT_TITLE_TEMPLATE if self.topic == self.COURSE_TITLE else self.PROMPT_TEMPLATE
|
||||
prompt = formatter.format(formation=self.FORMATION,
|
||||
role=self.prefix,
|
||||
|
|
@ -84,7 +89,9 @@ class WriteTeachingPlanPart(Action):
|
|||
COURSE_TITLE = "Title"
|
||||
TOPICS = [COURSE_TITLE, "Teaching Hours", "Teaching Objectives", "Teaching Content",
|
||||
"Teaching Methods and Strategies", "Learning Activities",
|
||||
"Teaching Time Allocation", "Assessment and Feedback", "Teaching Summary and Improvement"]
|
||||
"Teaching Time Allocation", "Assessment and Feedback", "Teaching Summary and Improvement",
|
||||
"Vocabulary Practice", "Grammar Practice", "Reading Comprehension", "Listening Practice",
|
||||
"Writing Practice", "Speaking Practice", "Translation Practice", "Listening and Speaking Activities"]
|
||||
|
||||
TOPIC_STATEMENTS = {
|
||||
COURSE_TITLE: ["Statement: Find and return the title of the lesson only in markdown first-level header format, "
|
||||
|
|
@ -99,6 +106,52 @@ class WriteTeachingPlanPart(Action):
|
|||
"Teaching Methods and Strategies": [
|
||||
"Statement: \"Teaching Methods and Strategies\" must include teaching focus, difficulties, materials, "
|
||||
"procedures, in detail."
|
||||
],
|
||||
"Vocabulary Practice": [
|
||||
"Statement: Based on the content of the textbook enclosed by \"[LESSON_BEGIN]\" and \"[LESSON_END]\", "
|
||||
"create vocabulary practice exercises. The exercises should be in either {language} with "
|
||||
"{teaching_language} answers or {teaching_language} with {language} answers. The key-related vocabulary "
|
||||
"and phrases in the textbook content must all be included in the exercises."
|
||||
],
|
||||
"Grammar Practice": [
|
||||
"Statement: Based on the content of the textbook enclosed by \"[LESSON_BEGIN]\" and \"[LESSON_END]\", "
|
||||
"create grammar practice exercises. "],
|
||||
"Reading Comprehension": [
|
||||
"Statement: Based on the vocabulary of the textbook enclosed by \"[LESSON_BEGIN]\" and \"[LESSON_END]\", "
|
||||
"create {teaching_language} reading comprehension exercises. ",
|
||||
"Statement: Prohibit the use of words that are not within the scope of the \"[LESSON_BEGIN]\" "
|
||||
"and \"[LESSON_END]\" tags.",
|
||||
"Statement: Prohibit copy the content of the \"[LESSON_BEGIN]\" and \"[LESSON_END]\" tags.",
|
||||
"Answer options: Write the story content in {teaching_language}."
|
||||
],
|
||||
"Listening Practice": [
|
||||
"Statement: Based on the content of the textbook enclosed by \"[LESSON_BEGIN]\" and \"[LESSON_END]\", "
|
||||
"create listening practice exercises. Each exercise should include the audio content and the "
|
||||
"question-and-answer part."
|
||||
],
|
||||
"Writing Practice": [
|
||||
"Statement: Based on the content of the textbook enclosed by \"[LESSON_BEGIN]\" and \"[LESSON_END]\", "
|
||||
"create writing practice exercises.",
|
||||
#"Statement: Prohibit using content not related to \"[LESSON_BEGIN]\" and \"[LESSON_END]\" tags.",
|
||||
"Statement: Prohibit copying the content enclosed by \"[LESSON_BEGIN]\" and \"[LESSON_END]\" tags."
|
||||
],
|
||||
"Speaking Practice": [
|
||||
"Statement: Based on the content of the textbook enclosed by \"[LESSON_BEGIN]\" and \"[LESSON_END]\", "
|
||||
"create speaking practice exercises.",
|
||||
#"Statement: Prohibit using content not related to \"[LESSON_BEGIN]\" and \"[LESSON_END]\" tags.",
|
||||
"Statement: Prohibit copying the content enclosed by \"[LESSON_BEGIN]\" and \"[LESSON_END]\" tags."
|
||||
],
|
||||
"Translation Practice": [
|
||||
"Statement: Based on the content of the textbook enclosed by \"[LESSON_BEGIN]\" and \"[LESSON_END]\", "
|
||||
"create Translation practice exercises.",
|
||||
#"Statement: Prohibit using content not related to \"[LESSON_BEGIN]\" and \"[LESSON_END]\" tags.",
|
||||
"Statement: Prohibit copying the content enclosed by \"[LESSON_BEGIN]\" and \"[LESSON_END]\" tags."
|
||||
],
|
||||
"Listening and Speaking Activities": [
|
||||
"Statement: Based on the content of the textbook enclosed by \"[LESSON_BEGIN]\" and \"[LESSON_END]\", "
|
||||
"create listening and speaking activities exercises.",
|
||||
#"Statement: Prohibit using content not related to \"[LESSON_BEGIN]\" and \"[LESSON_END]\" tags.",
|
||||
"Statement: Prohibit copying the content enclosed by \"[LESSON_BEGIN]\" and \"[LESSON_END]\" tags."
|
||||
]
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -196,7 +196,7 @@ class Role:
|
|||
|
||||
logger.info(f"{self._setting}: ready to {self._rc.todo}")
|
||||
requirement = self._rc.important_memory
|
||||
response = await self._rc.todo.run(requirement)
|
||||
response = await self._rc.todo.run(requirement, **self._options)
|
||||
# logger.info(response)
|
||||
if isinstance(response, ActionOutput):
|
||||
msg = Message(content=response.content, instruct_content=response.instruct_content,
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ async def education_startup(lesson_file: str, investment: float = 3.0, n_round:
|
|||
3a Listen, say and trace
|
||||
Aa Bb Cc Dd Ee Ff Gg
|
||||
|
||||
3b Listen and number the following letters. Then circle the letters withthe same sound as Bb.
|
||||
3b Listen and number the following letters. Then circle the letters with the same sound as Bb.
|
||||
Aa Bb Cc Dd Ee Ff Gg
|
||||
|
||||
3c Match the big letters with the small ones. Then write them on the lines.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue