This commit is contained in:
di-sukharev
2023-05-20 13:00:24 +08:00
parent ffdf45dc17
commit 52a71728d4
2 changed files with 2 additions and 2 deletions

View File

@@ -27936,7 +27936,7 @@ async function improveCommitMessagesWithRebase(commits) {
(commit) => generateCommitMessageByDiff(commit.diff)
);
async function improveMessagesInChunks() {
const chunkSize = improvePromises.length % 2 === 0 ? 2 : 3;
const chunkSize = improvePromises.length % 2 === 0 ? 4 : 3;
let improvedMessagesBySha2 = {};
for (let i2 = 0; i2 < improvePromises.length; i2 += chunkSize) {
console.log({ i: i2, improvedMessagesBySha: improvedMessagesBySha2 });

View File

@@ -73,7 +73,7 @@ async function improveCommitMessagesWithRebase(commits: CommitsArray) {
// send chunks of 3 diffs in parallel, because openAI restricts too many requests at once with 429 error
async function improveMessagesInChunks() {
const chunkSize = improvePromises.length % 2 === 0 ? 2 : 3;
const chunkSize = improvePromises.length % 2 === 0 ? 4 : 3;
let improvedMessagesBySha: MessageBySha = {};
for (let i = 0; i < improvePromises.length; i += chunkSize) {
console.log({ i, improvedMessagesBySha });