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 b64b9da commit 9ba5173Copy full SHA for 9ba5173
api/app/clients/OpenAIClient.js
@@ -1464,7 +1464,11 @@ ${convo}
1464
(err instanceof OpenAI.OpenAIError && err?.message?.includes('missing finish_reason'))
1465
) {
1466
logger.error('[OpenAIClient] Known OpenAI error:', err);
1467
- return intermediateReply.join('');
+ if (intermediateReply.length > 0) {
1468
+ return intermediateReply.join('');
1469
+ } else {
1470
+ throw err;
1471
+ }
1472
} else if (err instanceof OpenAI.APIError) {
1473
if (intermediateReply.length > 0) {
1474
return intermediateReply.join('');
0 commit comments