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
Status code 400, "{"error":{"code":"BadRequest","message":"logprobs, best_of and echo parameters are not available on gpt-35-turbo model. Please remove the parameter and try again. For more details, see https://go.microsoft.com/fwlink/?linkid=2227346."}}"
I setup a debugging HttpPipelinePolicy that shows that the submitted payload is:
{"prompt":["convert the following list into a json array: - one - two - three"],"max_tokens":800,"temperature":0.0,"top_p":1.0,"logit_bias":null,"user":null,"n":null,"logprobs":null,"echo":null,"stop":null,"presence_penalty":0.0,"frequency_penalty":0.0,"best_of":null,"stream":null,"model":null}
So the indicated "bad" values are being sent as null.
When I try the same payload via Postman, I get the same error. Remove the fields, even though null, I get the expected response.
While trying to work through the problem I checked out the source from Github, and simply added:
@Fluent
@JsonInclude(Include.NON_NULL)
public final class CompletionsOptions {
The - @JsonInclude(Include.NON_NULL), to the existing code and then everything worked as expected. All the null properties where not sent as part of the payload and the results where returned as expected.
What I don't know is should this be submitted as a defect and corrected in the base code, or is there a way to modify the Jackson configuration so that the Null values are never included -- but this will need to be done at the OpenAIClient level as I use Jackson in other parts of my code and I don't want to have a derogatory affect.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm trying to leverage the OpenAI Java samples here:
when running it, I get the error:
I setup a debugging HttpPipelinePolicy that shows that the submitted payload is:
So the indicated "bad" values are being sent as null.
When I try the same payload via Postman, I get the same error. Remove the fields, even though null, I get the expected response.
While trying to work through the problem I checked out the source from Github, and simply added:
The - @JsonInclude(Include.NON_NULL), to the existing code and then everything worked as expected. All the null properties where not sent as part of the payload and the results where returned as expected.
What I don't know is should this be submitted as a defect and corrected in the base code, or is there a way to modify the Jackson configuration so that the Null values are never included -- but this will need to be done at the OpenAIClient level as I use Jackson in other parts of my code and I don't want to have a derogatory affect.
Thoughts?
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions