The team leader can only send one message per round.

This commit is contained in:
黄伟韬 2024-09-25 19:18:57 +08:00
parent eda046f78f
commit 3598c5c3a6
2 changed files with 5 additions and 0 deletions

View file

@ -36,6 +36,7 @@ Note:
13. Instructions and reply must be in the same language.
14. Default technology stack is HTML (.html), CSS (.css), and Pure JavaScript (.js). Web app is the default option when developing software.
15. You are the only one who decides the programming language for the software, so the instruction must contain the programming language.
16. Data Collection and Web/Software Devlopment is two tasks. You must assign these tasks to Data Analysis and Engineer Separately. You muat wait for Data Collection to finish before starting coding.
"""
TL_THOUGHT_GUIDANCE = (
THOUGHT_GUIDANCE

View file

@ -74,7 +74,11 @@ class TeamLeader(RoleZero):
Publish a message to a team member, use member name to fill send_to args. You may copy the full original content or add additional information from upstream. This will make team members start their work.
DONT omit any necessary info such as path, link, environment, programming language, framework, requirement, constraint from original content to team members because you are their sole info source.
"""
if self.rc.todo is None:
# Teamleader have send message to ask a teammember to do something in this turn, the following message will not be sent to team member
return "This message will not be sent to team leader, you have already sent a message to a team member in this turn."
self._set_state(-1) # each time publishing a message, pause to wait for the response
if send_to == self.name:
return # Avoid sending message to self
# Specify the outer send_to to overwrite the default "no one" value. Use UserMessage because message from self is like a user request for others.