Skip to content

Commit d22949d

Browse files
authored
Hallucination fix
Hallucination fix
2 parents 308fc25 + 6c3058a commit d22949d

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

interpreter/core/respond.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -181,18 +181,16 @@ def respond(interpreter):
181181
except:
182182
pass
183183

184+
# print(code)
185+
# print("---")
186+
# time.sleep(2)
187+
184188
if code.strip().endswith("executeexecute"):
185-
edited_code = code.replace("executeexecute", "")
189+
code = code.replace("executeexecute", "")
186190
try:
187-
code_dict = json.loads(edited_code)
188-
language = code_dict.get("language", language)
189-
code = code_dict.get("code", code)
190191
interpreter.messages[-1][
191192
"content"
192193
] = code # So the LLM can see it.
193-
interpreter.messages[-1][
194-
"format"
195-
] = language # So the LLM can see it.
196194
except:
197195
pass
198196

0 commit comments

Comments
 (0)