Merge pull request #854 from garylin2099/ci_dev

fix empty code when aask_code not returning language
This commit is contained in:
garylin2099 2024-02-06 23:25:05 +08:00 committed by GitHub
commit ce985b8a73
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -72,11 +72,7 @@ class CodeInterpreter(Role):
if ReviewConst.CHANGE_WORDS[0] in review:
counter = 0 # redo the task again with help of human suggestions
py_code = (
code["code"] if code.get("language") == "python" else ""
) # use python code as final code; for markdown, return the rendered result instead of the code itself
return py_code, result, success
return code["code"], result, success
async def _write_code(self):
todo = WriteCodeWithoutTools() if not self.use_tools else WriteCodeWithTools(selected_tools=self.tools)