diff --git a/package.json b/package.json index 858a672..bf497c2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aslobot-matrix", - "version": "0.7.1", + "version": "0.7.2", "description": "", "license": "ISC", "author": "", diff --git a/src/modules/ai/ai.ts b/src/modules/ai/ai.ts index 8743b21..d5d4d2c 100644 --- a/src/modules/ai/ai.ts +++ b/src/modules/ai/ai.ts @@ -3,7 +3,7 @@ import type { ICallbackStore } from "../types.js"; import { config } from "../../config.js"; import { getTextGemini, getImageGemini } from "../../services/ai/ai.js"; import { alts } from "./alts.js"; -import type { IAdminInstructions } from "./types.js"; +import type { IAdminInstructions, IAIAlt } from "./types.js"; import { getUserById, getUserName } from "../../helpers.js"; import { prices } from "./prices.js"; @@ -38,7 +38,11 @@ const onAI = async (text: string, roomId: string, sender: string) => { let instructions = { prefferedLanguages: ["english", "slovak"], adminText: config.app.ai.prompt, - alts: alts, + alts: alts.map((alt) => ({ + keys: alt.keys, + alt: alt.alt, + information: user.information, + })), } as IAdminInstructions; const username = getUserName(user); diff --git a/src/modules/ai/alts.ts b/src/modules/ai/alts.ts index 6a162d2..f7b8ead 100644 --- a/src/modules/ai/alts.ts +++ b/src/modules/ai/alts.ts @@ -16,17 +16,14 @@ const alts: IAIAlt[] = [ "macag", ], alt: "black cat", - information: "an evil cat, married to white cat", }, { keys: ["macica", "macico"], alt: "white cat", - information: "married to black cat", }, { keys: ["gabor", "gaber", "martin", "marting"], alt: "hedgehog", - information: "married to ai", }, { keys: [ @@ -40,17 +37,14 @@ const alts: IAIAlt[] = [ "madek", ], alt: "beaver", - information: "likes shoot fetish", }, { keys: ["janys", "jano", "janeg", "janek", "aslanek", "aslan", "aslo"], alt: "lion", - information: "the creator", }, { keys: ["marek", "mareg", "macek", "maceg", "rod"], alt: "purple snake", - information: "drives fast", }, { keys: ["lara", "kostur", "kosturik"], diff --git a/src/modules/ai/types.ts b/src/modules/ai/types.ts index 1189939..6fbe64e 100644 --- a/src/modules/ai/types.ts +++ b/src/modules/ai/types.ts @@ -1,7 +1,7 @@ interface IAIAlt { keys: string[]; alt: string; - information?: string; + information?: string | undefined; } interface IAdminInstructions { diff --git a/src/modules/base/base.ts b/src/modules/base/base.ts index 2e119bb..d406df5 100644 --- a/src/modules/base/base.ts +++ b/src/modules/base/base.ts @@ -68,7 +68,8 @@ const onHelp = (_text: string, roomId: string) => {