-
Notifications
You must be signed in to change notification settings - Fork 68
Output Processing #35
Comments
In case its useful to anyone this is what I did to compensate for the junk in the responses.
|
Awesome, thanks for this. I was actually thinking of starting up a new repo called the "Unity OpenAI Toolkit", or something along those lines, as a Unity package that that will depend on the API wrapper, but provide some of these higher level tools. If you have any other ideas, please let me know. |
I revised my code after extensive testing showed some Unicode parsing errors triggering an Argument exception when trying to regrex decode the unicode. Here is the revised parsing to 'clean' the GPT response string.
|
Ok here's what I've figured out... It's UTF16/32 that's been escaped some how. All of the \\2019 (and similar) are actually supposed to be \u2019 which Unity then reads and displays correctly; in this case as an apostrophe. Having said that I've been struggling on and off for weeks trying to get this to reparse on my side properly and am close to giving up and just adding a ton of Replace commands for specific characters that are showing up commonly. |
Here's the full and ultimate fix...
|
OpenAI spits out some funny outputs with lots of // and stuff. It would be nice to add a processing layer to the output with an interface so that output processing can be customized.
Adding this functionality, or at least the interfaces, would facilitate the output of the REST adapter layer to the consuming layer.
The text was updated successfully, but these errors were encountered: