clean up some shit

This commit is contained in:
2025-10-28 17:35:05 +00:00
parent 2a53b0a827
commit d40b51460e
2 changed files with 8 additions and 4 deletions

View File

@ -10,4 +10,5 @@ OLLAMA_SYSTEM_PROMPT="" # system prompt - used to help tune the responses from t
OLLAMA_MODEL="" # Ollama model for responses e.g dolphin-mistral:latest
FETCH_INTERVAL="" # interval for fetching new notifications from the instance, in milliseconds, recommend at least 15000
RANDOM_POST_INTERVAL="" # interval for ad-hoc posts in milliseconds
INSTANCE_BEARER_TOKEN="" # instance auth/bearer token (check the "verify_credentials" endpoint request headers in Chrome DevTools if on Soapbox)
INSTANCE_BEARER_TOKEN="" # instance auth/bearer token (check the "verify_credentials" endpoint request headers in Chrome DevTools if on Soapbox)
AD_HOC_POST_INSTRUCTIONS=""

View File

@ -41,6 +41,9 @@ export const envConfig = {
: 3600000,
botAccountId: process.env.PLEROMA_ACCOUNT_ID,
replyWithContext: process.env.REPLY_WITH_CONTEXT === "true" ? true : false,
adHocPostInstructions: process.env.AD_HOC_POST_INSTRUCTIONS
? process.env.AD_HOC_POST_INSTRUCTIONS
: "Say something.",
};
const ollamaConfig: OllamaConfigOptions = {
@ -258,15 +261,15 @@ const createTimelinePost = async () => {
ollamaSystemPrompt,
ollamaUrl,
pleromaInstanceUrl,
adHocPostInstructions,
} = envConfig;
const ollamaRequestBody: OllamaChatRequest = {
model: ollamaModel,
messages: [
{ role: "system", content: ollamaSystemPrompt as string },
{ role: "system", content: ollamaSystemPrompt },
{
role: "user",
content:
"Make a post about something. Keep your tone authentic, as if you are a real person making a post about a topic that interests you on a microblogging platform. This can be about anything like politics, gardening, homesteading, your favorite animal, a fun fact, what happened during your day, seeking companionship, baking, cooking, et cetera. Do not format the post with a title or quotes, nor sign the post with your name. It will be posted to your timeline so everyone will know you said it.",
content: adHocPostInstructions,
},
],
stream: false,