clean up some shit
This commit is contained in:
@ -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
|
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
|
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
|
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=""
|
||||||
@ -41,6 +41,9 @@ export const envConfig = {
|
|||||||
: 3600000,
|
: 3600000,
|
||||||
botAccountId: process.env.PLEROMA_ACCOUNT_ID,
|
botAccountId: process.env.PLEROMA_ACCOUNT_ID,
|
||||||
replyWithContext: process.env.REPLY_WITH_CONTEXT === "true" ? true : false,
|
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 = {
|
const ollamaConfig: OllamaConfigOptions = {
|
||||||
@ -258,15 +261,15 @@ const createTimelinePost = async () => {
|
|||||||
ollamaSystemPrompt,
|
ollamaSystemPrompt,
|
||||||
ollamaUrl,
|
ollamaUrl,
|
||||||
pleromaInstanceUrl,
|
pleromaInstanceUrl,
|
||||||
|
adHocPostInstructions,
|
||||||
} = envConfig;
|
} = envConfig;
|
||||||
const ollamaRequestBody: OllamaChatRequest = {
|
const ollamaRequestBody: OllamaChatRequest = {
|
||||||
model: ollamaModel,
|
model: ollamaModel,
|
||||||
messages: [
|
messages: [
|
||||||
{ role: "system", content: ollamaSystemPrompt as string },
|
{ role: "system", content: ollamaSystemPrompt },
|
||||||
{
|
{
|
||||||
role: "user",
|
role: "user",
|
||||||
content:
|
content: adHocPostInstructions,
|
||||||
"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.",
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
stream: false,
|
stream: false,
|
||||||
|
|||||||
Reference in New Issue
Block a user