rm forward_message

This commit is contained in:
yzlin 2024-04-25 12:00:32 +08:00
parent f621186c2e
commit e39f7ff0b1
8 changed files with 26 additions and 65 deletions

View file

@ -86,7 +86,7 @@ class SimplePlanningExpRetriever(ExpRetriever):
Conversation History:
[
...,
{'role': 'assistant', 'content': 'id: 739d9b4983fd4e97a0f78fde5e9ef158, from Alice(Product Manager) to {'Bob'}: {'docs': {'20240424153821.json': {'root_path': 'docs/prd', 'filename': '20240424153821.json', 'content': '{"Language":"en_us","Programming Language":"Python","Original Requirements":"create a cli snake game","Project Name":"snake_game","Product Goals":["Develop an intuitive and addictive snake game",...], ...}}}}},
{'role': 'assistant', 'content': 'from Alice(Product Manager) to {'Bob'}: {'docs': {'20240424153821.json': {'root_path': 'docs/prd', 'filename': '20240424153821.json', 'content': '{"Language":"en_us","Programming Language":"Python","Original Requirements":"create a cli snake game","Project Name":"snake_game","Product Goals":["Develop an intuitive and addictive snake game",...], ...}}}}},
]
Explanation: You received a message from Alice, the Product Manager, that she has completed the PRD, use finish_current_task, this marks her task as finished and moves the plan to the next task.
```json
@ -101,30 +101,3 @@ class SimplePlanningExpRetriever(ExpRetriever):
def retrieve(self, context: str = "") -> str:
return self.EXAMPLE
class SimpleRoutingExpRetriever(ExpRetriever):
"""A simple experience retriever that returns manually crafted routing examples."""
EXAMPLE: str = """
## example 1: Forward a message from one team member to another
Conversation History:
[
...,
{'role': 'assistant', 'content': 'id: 739d9b4983fd4e97a0f78fde5e9ef158, from Alice(Product Manager) to {'Bob'}: {'docs': {'20240424153821.json': {'root_path': 'docs/prd', 'filename': '20240424153821.json', 'content': '{"Language":"en_us","Programming Language":"Python","Original Requirements":"create a cli snake game","Project Name":"snake_game","Product Goals":["Develop an intuitive and addictive snake game",...], ...}}}}},
{'role': 'assistant', 'content': 'Based on the feedback from Alice, the Product Manager, it seems that the PRD for the snake game has been successfully created. Since the PRD is complete and there are no indications of issues with the task, we can mark the current task as finished and move on to the next task in the plan. The next task is assigned to Bob, the Architect, who will be responsible for designing the software architecture for the game based on the PRD provided by Alice.\n\nHere are the commands to update the plan status:\n\n```json\n[\n {\n "command_name": "finish_current_task"\n }\n]\n```'}
]
Command:
```json
[
{
"command_name": "forward_message",
"args": {
"message_id": "739d9b4983fd4e97a0f78fde5e9ef158"
}
}
]
"""
def retrieve(self, context: str = "") -> str:
return self.EXAMPLE

View file

@ -38,11 +38,6 @@ class Command(Enum):
signature="publish_message(content: str, send_to: str)",
desc="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 from original content to team members because you are their sole info source. However, if the original content is long or contains concrete info, you should forward the message using forward_message instead of publishing it.",
)
FORWARD_MESSAGE = CommandDef(
name="forward_message",
signature="forward_message(message_id: str)",
desc="Forward a message from one team member to another or all without any modification. This will make the recipient start their work, too.",
)
REPLY_TO_HUMAN = CommandDef(
name="reply_to_human",
signature="reply_to_human(content: str)",