SuperAGI icon indicating copy to clipboard operation
SuperAGI copied to clipboard

Fix json process

Open hanhyalex123 opened this issue 2 years ago • 1 comments

As you can see, the current JSON string returned by ChatGPT contains many "\n" characters, some of which are inside the "content" field and some are outside. The previous solution was to remove all "\n" characters, which caused the loss of all line breaks and structure when storing the data as a file, especially for code. Therefore, my approach is to first extract the content from the JSON string, remove all "\n" characters, and then put it back to its original position.

hanhyalex123 avatar Jun 15 '23 03:06 hanhyalex123

wait

hanhyalex123 avatar Jun 15 '23 04:06 hanhyalex123

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Jul 27 '23 09:07 CLAassistant

This change is not applicable for latest json schema

TransformerOptimus avatar Aug 28 '23 07:08 TransformerOptimus