Skip to content

Commit d2f830c

Browse files
committed
build: Use Open AI key to generate contributor pool report
1 parent e59f9c7 commit d2f830c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/generate-contributor-pool.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ const fs = require("fs");
1818
// Data
1919
//-----------------------------------------------------------------------------
2020

21-
const { GITHUB_TOKEN } = process.env;
21+
const { GITHUB_TOKEN, OPENAI_API_KEY } = process.env;
2222
const now = moment();
2323
const firstDayOfPreviousMonth = now.clone().subtract(1, "month").startOf("month");
2424
const lastDayOfPreviousMonth = firstDayOfPreviousMonth.clone().endOf("month");
2525

2626
const AI_URL = "https://models.github.ai/inference/chat/completions";
27-
const AI_MODEL = "openai/gpt-4o";
27+
const AI_MODEL = "openai/gpt-4o-mini";
2828

2929
const PROMPT = `You will be given a JSON object where the keys are GitHub
3030
usernames and the values are arrays of pull request objects that were
@@ -159,7 +159,7 @@ async function fetchModelResponse(grouped) {
159159
method: "POST",
160160
headers: {
161161
"Content-Type": "application/json",
162-
Authorization: `Bearer ${GITHUB_TOKEN}`
162+
Authorization: `Bearer ${OPENAI_API_KEY}`
163163
},
164164
body: JSON.stringify({
165165
model: AI_MODEL,

0 commit comments

Comments
 (0)