refine prompt

This commit is contained in:
lidanyang 2024-07-17 15:16:24 +08:00
parent 127ef8707b
commit 5a309005c4
3 changed files with 4 additions and 2 deletions

View file

@ -105,5 +105,7 @@ class DataAnalyst(RoleZero):
status = 'Success' if success else 'Failed'
output = CODE_STATUS.format(code=code, status=status, result=result)
if success:
output += 'The code written has been executed successfully.'
self.rc.working_memory.clear()
return output

View file

@ -1035,7 +1035,7 @@ Explanation: The requirement is to scrape data from a website and extract inform
"command_name": "Plan.append_task",
"args": {
"task_id": "2",
"dependent_task_ids": ["3"],
"dependent_task_ids": ["1"],
"instruction": "Parse the html content to scrape the restaurant names and print it.",
"assignee": "David"
}

View file

@ -47,7 +47,7 @@ PLAN_STATUS = """
{current_task_result}
## Task Guidance
Write code for the incomplete sections of 'Current Task'. And avoid duplicating code from 'Finished Tasks', such as repeated import of packages, reading data, etc.
Write code for the incomplete sections of 'Current Task'. And avoid duplicating code from 'Finished Tasks' and 'Finished Section of Current Task', such as repeated import of packages, reading data, etc.
Specifically, {guidance}
"""