More AI improvements

This commit is contained in:
Aslan 2025-12-28 18:26:11 +01:00
parent 59d54b37fb
commit dcd6778c19
5 changed files with 11 additions and 4 deletions

View file

@ -24,7 +24,8 @@
"ai": { "ai": {
"api": { "api": {
"key": "" "key": ""
} },
"prompt": "Your name is Aslobot. Be concise, try to keep text as short as possible. Be helpful."
} }
} }
} }

View file

@ -37,8 +37,7 @@ const onAI = async (text: string, roomId: string, sender: string) => {
let textMod = text.replace("!ai", "").trim().toLowerCase(); let textMod = text.replace("!ai", "").trim().toLowerCase();
let instructions = { let instructions = {
prefferedLanguages: ["english", "slovak"], prefferedLanguages: ["english", "slovak"],
adminText: adminText: config.app.ai.prompt,
"Your name is Aslobot. Be concise, try to keep text as short as possible. Be helpful, but you are encouraged to be sarcastic and make fun of people",
alts: alts, alts: alts,
} as IAdminInstructions; } as IAdminInstructions;

View file

@ -16,14 +16,17 @@ const alts: IAIAlt[] = [
"macag", "macag",
], ],
alt: "black cat", alt: "black cat",
information: "an evil cat, married to white cat",
}, },
{ {
keys: ["macica", "macico"], keys: ["macica", "macico"],
alt: "white cat", alt: "white cat",
information: "married to black cat",
}, },
{ {
keys: ["gabor", "gaber", "martin", "marting"], keys: ["gabor", "gaber", "martin", "marting"],
alt: "hedgehog", alt: "hedgehog",
information: "married to ai",
}, },
{ {
keys: [ keys: [
@ -37,14 +40,17 @@ const alts: IAIAlt[] = [
"madek", "madek",
], ],
alt: "beaver", alt: "beaver",
information: "likes shoot fetish",
}, },
{ {
keys: ["janys", "jano", "janeg", "janek", "aslanek", "aslan", "aslo"], keys: ["janys", "jano", "janeg", "janek", "aslanek", "aslan", "aslo"],
alt: "lion", alt: "lion",
information: "the creator",
}, },
{ {
keys: ["marek", "mareg", "macek", "maceg", "rod"], keys: ["marek", "mareg", "macek", "maceg", "rod"],
alt: "purple snake", alt: "purple snake",
information: "drives fast",
}, },
{ {
keys: ["lara", "kostur", "kosturik"], keys: ["lara", "kostur", "kosturik"],

View file

@ -1,6 +1,7 @@
interface IAIAlt { interface IAIAlt {
keys: string[]; keys: string[];
alt: string; alt: string;
information?: string;
} }
interface IAdminInstructions { interface IAdminInstructions {

View file

@ -82,7 +82,7 @@ const onAILeaderboard = (_text: string, roomId: string) => {
const userNameMod = const userNameMod =
userName.charAt(0).toUpperCase() + userName.slice(1); userName.charAt(0).toUpperCase() + userName.slice(1);
return `<li>${userNameMod}: cost <b>${cost}</b></li>`; return `<li>${userNameMod}: cost <b>${cost.toFixed(2)}$</b></li>`;
}; };
const users = state.users.sort( const users = state.users.sort(