Skip to content

Commit b877e0b

Browse files
committed
fix(gh-actions): rebuild
1 parent e33aa2d commit b877e0b

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

  • .github/actions/javascript/proposalPoliceComment

.github/actions/javascript/proposalPoliceComment/index.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12575,19 +12575,23 @@ class OpenAIUtils {
1257512575
*/
1257612576
async promptAssistant(assistantID, userMessage) {
1257712577
// 1. Create a thread
12578-
const thread = await (0, retryWithBackoff_1.default)(() => this.client.beta.threads.create({
12578+
const thread = await (0, retryWithBackoff_1.default)(() =>
12579+
// eslint-disable-next-line deprecation/deprecation
12580+
this.client.beta.threads.create({
1257912581
messages: [{ role: OpenAIUtils.USER, content: userMessage }],
1258012582
}), { isRetryable: (err) => OpenAIUtils.isRetryableError(err) });
1258112583
// 2. Create a run on the thread
12582-
let run = await (0, retryWithBackoff_1.default)(() => this.client.beta.threads.runs.create(thread.id, {
12584+
let run = await (0, retryWithBackoff_1.default)(() =>
12585+
// eslint-disable-next-line deprecation/deprecation
12586+
this.client.beta.threads.runs.create(thread.id, {
1258312587
// eslint-disable-next-line @typescript-eslint/naming-convention
1258412588
assistant_id: assistantID,
1258512589
}), { isRetryable: (err) => OpenAIUtils.isRetryableError(err) });
1258612590
// 3. Poll for completion
1258712591
let response = '';
1258812592
let count = 0;
1258912593
while (!response && count < OpenAIUtils.MAX_POLL_COUNT) {
12590-
// eslint-disable-next-line @typescript-eslint/naming-convention
12594+
// eslint-disable-next-line @typescript-eslint/naming-convention, deprecation/deprecation
1259112595
run = await this.client.beta.threads.runs.retrieve(run.id, { thread_id: thread.id });
1259212596
if (run.status !== OpenAIUtils.OPENAI_RUN_COMPLETED) {
1259312597
count++;
@@ -12596,6 +12600,7 @@ class OpenAIUtils {
1259612600
});
1259712601
continue;
1259812602
}
12603+
// eslint-disable-next-line deprecation/deprecation
1259912604
for await (const message of this.client.beta.threads.messages.list(thread.id)) {
1260012605
if (message.role !== OpenAIUtils.ASSISTANT) {
1260112606
continue;

0 commit comments

Comments
 (0)