Model returned an empty response

Sometimes, chat-models may work correctly and give a successful response, but that response is empty. In most cases, this is caused by the max_tokens (Output length) parameter being too low. It happens because some models "think" before giving a response, and they may hit this limit while thinking, thus not having any room left for a response.

To resolve the issue, try this:

  • If it's a Playground request, increase the Output length value on the right side of the screen
  • If it's an API request, increase the max_tokens value. If you are not setting it in your request, then add it, and use a number higher than default (512), like so:

"max_tokens": 3000


If this did not help, please contact our technical support.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us