We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4dd4b0e commit 9c89e1fCopy full SHA for 9c89e1f
src/backend/src/modules/puterai/AIChatService.js
@@ -403,6 +403,9 @@ class AIChatService extends BaseService {
403
parameters.max_tokens = Math.floor(Math.min(parameters.max_tokens ?? Number.POSITIVE_INFINITY,
404
max_allowed_output_tokens,
405
model_max_tokens - (Math.ceil(text.length / 4))));
406
+ if (parameters.max_tokens < 1) {
407
+ parameters.max_tokens = undefined;
408
+ }
409
}
410
try {
411
ret = await svc_driver.call_new_({
0 commit comments