-
Notifications
You must be signed in to change notification settings - Fork 886
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Model can generate enormous amounts of whitespace/newlines and then the structured output is truncated #1185
Comments
I suggest to include this by default, and exposing the content to the user when |
the exception looks like this:
|
a better fix is adding to the prompt |
Thanks for the report, which model are you using? and do you have a request ID you could share? |
id system fingerprint |
Happened again in another project of mine. btw this was also reported in #596 Wondering if any news? |
Confirm this is a Node library issue and not an underlying OpenAI API issue
Describe the bug
When using
json_schema
, sometimes the model outputs thousands of newlines.At some point it reaches the max output length and stops, causing it to sometimes return a non valid json object (it didn't finish writing it).
Because of how this library is structured, the developer can't see the problem (the output is not logged).
I've found that including
will solve this.
To Reproduce
happens randomly when using
json_schema
Code snippets
No response
OS
irrelevant
Node version
irrelevant
Library version
4.71.1
The text was updated successfully, but these errors were encountered: