Model returned an empty response
Sometimes chat models may technically return a successful response, but the response is empty. In most cases, this happens because the max_tokens (output length) parameter is set too low.
It happens because some models "think" before giving a response, and they may exceed the limit during this internal processing, leaving no remaining tokens for the actual 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 you're making an API request, increase the
max_tokensvalue. If you are not setting it in your request, then add it, and use a value higher than default (512), for example:
"max_tokens": 3000
If the issue persists, please contact our technical support team.