update: add refactor code for make_tools.

This commit is contained in:
刘棒棒 2023-12-11 14:39:14 +08:00
parent 1265d3d924
commit ab020adec4

View file

@ -11,8 +11,10 @@ from metagpt.actions.write_analysis_code import WriteCodeByGenerate
class MakeTools(WriteCodeByGenerate):
DEFAULT_SYSTEM_MSG = """Please Create a General Function Code startswith `def` from any codes you got.\n
**Notice:The import statement must be written after `def`, it is very important for you.
Reflect on whether it meets the requirements of function. Must Write example code, and we will execute the example code.**
**Notice:1. The import statement must be written after `def`, it is very important for you.
2. Reflect on whether it meets the requirements of function.
3. Refactor your code with the best performance when dealing with big data.
4. Must Write example code, and it could be execute in the user machine.**
"""
def __init__(self, name: str = '', context=None, llm=None, workspace: str = None):