You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Confirm this is a Node library issue and not an underlying OpenAI API issue
This is an issue with the Node library
Describe the bug
The official OpenAI API Playground and this Node client may differ significantly in their Chat Completion responses, despite having the exact same request parameters, because the playground will insert an empty system message and the node client does not.
You could make an argument this is a bug with the OpenAI playground rather then this client, but starting here.
The request in question in the playground:
The node client code suggested from the playground (note no empty system message):
If you actually inspect the chrome traffic, however, note the presence of the empty system message:
If you run the exact suggested client code from the playground, the generated API request does not have the empty system message (confirmed via proxying HTTP traffic from my machine):
Adding the empty system message manually fixes the issue.
Pretty significant bug IMO, spent hours trying to figure out if this was real or if I was chasing ghosts. There are many topics on the forum about API playground requests differing from the Node client - this may explain a handful of them.
To Reproduce
Follow isntructions above.
Code snippets
No response
OS
MacOS
Node version
Node v20.15.1
Library version
4.67.3
The text was updated successfully, but these errors were encountered:
piazzatron
changed the title
Node Client does not provide empty system message, influencing API output compared relative to API Playground
Node Client does not provide empty system message, influencing API output compared to API Playground
Oct 16, 2024
Confirm this is a Node library issue and not an underlying OpenAI API issue
Describe the bug
The official OpenAI API Playground and this Node client may differ significantly in their Chat Completion responses, despite having the exact same request parameters, because the playground will insert an empty system message and the node client does not.
You could make an argument this is a bug with the OpenAI playground rather then this client, but starting here.
The request in question in the playground:
The node client code suggested from the playground (note no empty system message):
If you actually inspect the chrome traffic, however, note the presence of the empty system message:
If you run the exact suggested client code from the playground, the generated API request does not have the empty system message (confirmed via proxying HTTP traffic from my machine):
Adding the empty system message manually fixes the issue.
Pretty significant bug IMO, spent hours trying to figure out if this was real or if I was chasing ghosts. There are many topics on the forum about API playground requests differing from the Node client - this may explain a handful of them.
To Reproduce
Follow isntructions above.
Code snippets
No response
OS
MacOS
Node version
Node v20.15.1
Library version
4.67.3
The text was updated successfully, but these errors were encountered: