update code: directly get events instead of request mc

bug fix: human_msg and system_msg assignment
This commit is contained in:
stellahsr 2023-10-07 11:09:54 +08:00
parent 64a1246e1c
commit 84cb2fa3db
3 changed files with 5 additions and 4 deletions

View file

@ -22,7 +22,7 @@ class GenerateActionCode(Action):
Implement the logic for generating action code here.
"""
logger.info(f"human_msg {human_msg}, system_msg {system_msg}")
# logger.info(f"human_msg {human_msg}, system_msg {system_msg}")
rsp = await self._aask(prompt=human_msg, system_msgs=system_msg)
parsed_result = parse_action_response(rsp)
# logger.info(f"parsed_result is HERE: {parsed_result}")

View file

@ -313,7 +313,8 @@ class CurriculumDesigner(Base):
logger.debug(f"Todo is {todo}")
self.maintain_actions(todo)
# 获取最新的游戏周边环境信息
events = await self._obtain_events()
# events = await self._obtain_events()
events = self.game_memory.event
chest_observation = self.game_memory.chest_observation
# DesignCurriculum.set_qa_cache(self.game_memory.qa_cache)

View file

@ -36,8 +36,8 @@ class SkillManager(Base):
)
def encapsule_message(self, program_code, program_name, *args, **kwargs):
human_msg = self.render_system_message(load_prompt("skill"))
system_msg = self.render_human_message(
system_msg = self.render_system_message(load_prompt("skill"))
human_msg = self.render_human_message(
program_code + "\n\n" + f"The main function is `{program_name}`."
)
return {"system_msg": [system_msg.content], "human_msg": human_msg.content}