|
|
|
@ -65,6 +65,7 @@ async function postStatus(
|
|
|
|
|
}[],
|
|
|
|
|
visibility: "public" | "unlisted" | "private" | "direct",
|
|
|
|
|
reply_id?: string,
|
|
|
|
|
successCallback?: () => void,
|
|
|
|
|
) {
|
|
|
|
|
const response = await openai.createChatCompletion({
|
|
|
|
|
model: "gpt-3.5-turbo",
|
|
|
|
@ -86,6 +87,7 @@ async function postStatus(
|
|
|
|
|
});
|
|
|
|
|
lastPost = Math.floor(Date.now() / 1000);
|
|
|
|
|
console.log("Posted post!");
|
|
|
|
|
(successCallback ?? (() => {}))();
|
|
|
|
|
} catch {
|
|
|
|
|
console.log("Failed to post post; will try again next time.");
|
|
|
|
|
}
|
|
|
|
@ -180,8 +182,8 @@ while (true) {
|
|
|
|
|
newMessages,
|
|
|
|
|
status.visibility,
|
|
|
|
|
notif.status?.id,
|
|
|
|
|
() => respondedNotificationIds.push(notif.id),
|
|
|
|
|
);
|
|
|
|
|
respondedNotificationIds.push(notif.id);
|
|
|
|
|
} else {
|
|
|
|
|
// assume top-level
|
|
|
|
|
const prompt =
|
|
|
|
@ -200,8 +202,8 @@ while (true) {
|
|
|
|
|
newMessages,
|
|
|
|
|
status.visibility,
|
|
|
|
|
status.id,
|
|
|
|
|
() => respondedNotificationIds.push(notif.id),
|
|
|
|
|
);
|
|
|
|
|
respondedNotificationIds.push(notif.id);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
respondedNotificationIds.push(notif.id);
|
|
|
|
|