Auto-GPT-ZH icon indicating copy to clipboard operation
Auto-GPT-ZH copied to clipboard

Error: The following AI output couldn't be converted to a JSON:

Open leozvc opened this issue 1 year ago • 2 comments

⚠️ Search for existing issues first ⚠️

  • [X] I have searched the existing issues, and there is no existing issue for my problem

GPT-3 or GPT-4

  • [X] I am using Auto-GPT with GPT-3 (GPT-3.5)

Steps to reproduce 🕹

No response

Current behavior 😯

No response

Expected behavior 🤔

No response

Your prompt 📝

# Paste your prompt here

leozvc avatar Apr 21 '23 10:04 leozvc

Error: The following AI output couldn't be converted to a JSON:

bugcj avatar Apr 22 '23 10:04 bugcj

造成该BUG的原因:

  • triggering_prompt和system_prompt语言冲突
  • 由于triggering_promp的汉化造成gpt生成回复未按照system_prompt中的格式回复而导致无法自动修复/提取json格式。

推荐修复:

  1. 将system_prompt和一些role的prompt完全汉化(感觉不太划算,因为英文开销更小且返回结果更准确,,推荐第二个)
  2. 将triggering_prompt还原为
triggering_prompt = (
    "Determine which next command to use, and respond using the"
    " format specified above:"
)

不好的地方就在于全英文的prompt会造成写入文件等信息都是英文的XD

个人测试下来使用中文会导致生成结果结构未按照system prompt预期结构生成

使用英文的prompt会更准确,运行的出错率会更低

g1331 avatar Apr 23 '23 10:04 g1331