Closed aphexddb closed 1 year ago
awaiting fix for this too, spending hella $ on trying :P
cant wait till peeps become millionaires and make the creator a millionaire from this too.
Community effort to sort out this JSON fail once and for all at https://github.com/Torantulino/Auto-GPT/issues/1407
We have 17 open PRs for fixing this, and the merge-team are stacked.
logger.typewriter_log("[raw value of json_string]", json_string),What is stored in the json_string variable?
logger.typewriter_log("[raw value of json_string]", json_string),What is stored in the json_string variable?
@z-x-x136 This is logging line that was added, and it appears json_string
was an empty string passed to the attempt_to_fix_json_by_finding_outermost_brackets
method.
def attempt_to_fix_json_by_finding_outermost_brackets(json_string):
if cfg.speak_mode and cfg.debug_mode:
speak.say_text("I have received an invalid JSON response from the OpenAI API. Trying to fix it now.")
logger.typewriter_log("Attempting to fix JSON by finding outermost brackets\n")
logger.typewriter_log("[raw value of json_string]", json_string)
...
def attempt_to_fix_json_by_finding_outermost_brackets(json_string): if cfg.speak_mode and cfg.debug_mode: speak.say_text("I have received an invalid JSON response from the OpenAI API. Trying to fix it now.") logger.typewriter_log("Attempting to fix JSON by finding outermost brackets\n") logger.typewriter_log("[raw value of json_string]", json_string)
Thanks
Closing as one of many duplicates; superseded by #1407
Duplicates
Steps to reproduce 🕹
attempt_to_fix_json_by_finding_outermost_brackets
inscripts/main.py
and added the following line:In two sentences, summarize the current state of the Snow Crab ecosystem
" under the goal of researcher, the model returns an empty JSON string. This is reproducible.Current behavior 😯
Debug output:
Expected behavior 🤔
Model responses should be in JSON format that the program can read. The debug log shows vua
[raw value of json_string]
that an emptry string was passed toattempt_to_fix_json_by_finding_outermost_brackets
.Your prompt 📝
ai settings
prompt