fix: write_code_function bug.

This commit is contained in:
刘棒棒 2023-11-24 12:37:20 +08:00
parent bba3db5ffe
commit 8b171b5133

View file

@ -27,7 +27,7 @@ class WriteCodeFunction(BaseWriteAnalysisCode):
super().__init__(name, context, llm)
def process_msg(self, prompt: Union[str, List[Dict], Message, List[Message]], system_msg: str = None):
default_system_msg = """You are Open Interpreter, a world-class programmer that can complete any goal by executing code. Strictly follow the plan and generate code step by step. Each step of the code will be executed on the user's machine, and the user will provide the code execution results to you."""
default_system_msg = """You are Open Interpreter, a world-class programmer that can complete any goal by executing code. Strictly follow the plan and generate code step by step. Each step of the code will be executed on the user's machine, and the user will provide the code execution results to you.**Notice: The code for the next step depends on the code for the previous step.**"""
# 全部转成list
if not isinstance(prompt, list):
prompt = [prompt]