From fc5c01e21943edc7b84376f62e5d6c9ef5634203 Mon Sep 17 00:00:00 2001 From: better629 Date: Wed, 22 Nov 2023 13:56:49 +0800 Subject: [PATCH] fix --- metagpt/utils/repair_llm_raw_output.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metagpt/utils/repair_llm_raw_output.py b/metagpt/utils/repair_llm_raw_output.py index c26dc838d..a12a36fcc 100644 --- a/metagpt/utils/repair_llm_raw_output.py +++ b/metagpt/utils/repair_llm_raw_output.py @@ -82,7 +82,7 @@ def repair_required_key_pair_missing(output: str, req_key: str = "[/CONTENT]") - if left_key not in output: output = left_key + "\n" + output if right_key not in output: - def judge_potential_json(routput: str, left_key: str) -> Union[str, bool]: + def judge_potential_json(routput: str, left_key: str) -> Union[str]: routput = copy.deepcopy(routput) ridx = routput.rfind(left_key) if ridx < 0: