Skip to content

Commit 5ad93a3

Browse files
feat: activate gemini calls
1 parent 96a94cb commit 5ad93a3

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

.github/actions/auto-pr-description/generate_pr_description.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@ ${diffContent}`;
153153
*/
154154
async function callGeminiAPI(prompt, apiKey) {
155155
console.error(`Sending prompt with an estimated ${estimateTokens(prompt)} tokens`);
156-
return 'gemini'; /*
157156
const response = await fetch(`https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent?key=${apiKey}`, {
158157
method: 'POST',
159158
headers: { 'Content-Type': 'application/json' },
@@ -188,7 +187,6 @@ async function callGeminiAPI(prompt, apiKey) {
188187
}
189188

190189
return json.candidates[0].content.parts[0].text;
191-
*/
192190
}
193191

194192
/**
@@ -208,7 +206,7 @@ async function processChunks(chunks, apiKey) {
208206
const chunk = chunks[i];
209207
if (i > 0) {
210208
// sleep for 3 seconds
211-
sleep(3 * 1000);
209+
sleep(5 * 1000);
212210
}
213211
console.error(`Processing chunk ${i + 1}/${Math.min(chunks.length, MAX_CHUNKS)} (${chunk.file || 'unknown file'})`);
214212

@@ -227,7 +225,7 @@ async function processChunks(chunks, apiKey) {
227225
if (chunkResults.length === 0) {
228226
throw new Error('Failed to process any chunks');
229227
}
230-
sleep(3*1000);
228+
sleep(5*1000);
231229
// Combine results from multiple chunks
232230
const combinedPrompt = `Combine these pull request descriptions into a single, coherent PR description. Use the same format:
233231

0 commit comments

Comments
 (0)