Skip to content

Commit

Permalink
opt: log logic
Browse files Browse the repository at this point in the history
  • Loading branch information
leafmoes committed Oct 17, 2024
1 parent 34c8200 commit c1f11c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ async function createCompletion(model, content, returnStream, retryCount = 0) {
}
return handlerStream(model, response.body, returnStream);
} catch (err) {
console.log(err);
if (retryCount < config.MAX_RETRY_COUNT) {
console.log(err);
console.log('Retrying... count', ++retryCount);
await new Promise((resolve) => setTimeout(resolve, config.RETRY_DELAY));
return await createCompletion(model, content, returnStream, retryCount);
Expand Down

0 comments on commit c1f11c1

Please sign in to comment.