I’m writing a plugin that retrieves a page or two of text from an API, makes some revisions and submits that to another endpoint using a POST request. I notice that whenever the length of the revised version exceeds some amount, ChatGPT halts in the middle of forming the kwargs JSON, and after some time I see the following error:
ApiSyntaxError: Could not parse API call kwargs as JSON: exception=Unterminated string starting at: line 5 column 13 (char 291) url=http://localhost:5000/projects/{project_id}/drafts
I noticed that the generated kwargs are alway exactly 760 tokens long before being terminated. Is that a documented or undocumented limitation or a bug?