Failed to send message: "0 is less than the minimum 1 - max_tokens"
peperunas opened this issue · 3 comments
peperunas commented
Hello!
I have deployed golem
with Vercel. I cannot receive any response from the OpenAI API due to this error:
error Error sending message
Object { error: {…} }
Error: Failed to send message
NuxtJS 67
Caused by: Object { … }
entry.cbe35941.js:24:84
Where the Object is:
{
"error": {
"message": "0 is less than the minimum of 1 - 'max_tokens'",
"type": "invalid_request_error",
"param": null,
"code": null
}
}
henrycunh commented
Hey there! Have you set the Max Tokens settings to 0?
This is probably caused by setting it to 0, as only leaving it blank is actually accepted right now as a way of not limiting the amount of tokens. I will introduce a patch to allow 0 as a non-value as well! Thanks for the catch ❤️
peperunas commented
henrycunh commented
Oh, it's true! While debugging I could verify I introduced a regression on the max token settings, it doesn't work properly even when empty, thanks!