kix
1
During plugin development, I found odd behavior by ChatGPT where it would include a “//” comment in the JSON payload to the GET request for my plugin.
Has anyone found ways to prevent it from doing that? It’s generating invalid JSON in the request but I can see no straightforward way to prevent it from doing that through instructions in my OpenAPI spec.
kix
2
Found a couple of related issues: Comments in JSON payloads and Preventing Comments in JSON Query Body both suggest filtering out comments on the API side!
ruv
3
I use regex to parse these from the json posted to my api
rgbkrk
4
My clean FastAPI code will just have to change to adapt to plugin quirkiness. 
1 Like
Yeah, it’s quite an interesting challenge - most frameworks are deliberately very strict - it’s an API after all.