Troubleshooting of OpenAI API: Difference between revisions

Jump to navigation Jump to search
Line 158: Line 158:
   }
   }
</pre>
</pre>
=== How to fix "'messages' must contain the word 'json' in some form, to use 'response_format' of type 'json_object'" ===
Error message
<pre>
"error": {
        "message": "'messages' must contain the word 'json' in some form, to use 'response_format' of type 'json_object'.",
        "type": "invalid_request_error",
        "param": "messages",
        "code": null
      }
</pre>
Solution
* Add "output in JSON format" to the prompt ("system message")


=== How to fix "Missing bearer or basic authentication in header" ===
=== How to fix "Missing bearer or basic authentication in header" ===

Navigation menu