From 9a7cd118b3d4b26a3a86763f8a9a7044da5b4cdc Mon Sep 17 00:00:00 2001 From: matty Date: Sun, 6 Jul 2025 03:38:07 +0000 Subject: [PATCH] we do a little hackering on the 4channel --- src/main.ts | 8 ++++---- types.d.ts | 5 +++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/main.ts b/src/main.ts index eceffe3..304749c 100644 --- a/src/main.ts +++ b/src/main.ts @@ -29,8 +29,7 @@ const envConfig = { }; const ollamaConfig: OllamaConfigOptions = { - temperature: 0.6, - num_predict: 750, + temperature: 1.2, }; const getNotifications = async () => { @@ -155,9 +154,10 @@ const generateOllamaRequest = async ( if ( striptags(notification.status.content).includes("!prompt") && !notification.status.account.bot && // sanity check, sort of - notification.type === "mention" + notification.type === "mention" && + notification.status.visibility === "public" // for safety, let's only respond to public messages ) { - if (whitelistOnly && !(await isFromWhitelistedDomain(notification))) { + if (whitelistOnly && !isFromWhitelistedDomain(notification)) { return; } if (await alreadyRespondedTo(notification)) { diff --git a/types.d.ts b/types.d.ts index 5526f77..9ef1f0d 100644 --- a/types.d.ts +++ b/types.d.ts @@ -61,8 +61,9 @@ export interface Status { created_at: string | Date; // when the post was created id: string; // ID of the reply itself in_reply_to_account_id: string; // account ID of the reply - in_reply_to_id?: string; // status that the user has replied to - mentions?: Mention[]; // array of mentions + in_reply_to_id: string; // status that the user has replied to + mentions: Mention[]; // array of mentions + visibility: "private" | "public" | "unlisted"; } export interface Mention {