From f58060c32a18b01a6a3c8a3852d54a34eb2e273e Mon Sep 17 00:00:00 2001 From: Neon Date: Tue, 17 Dec 2024 14:48:57 -0500 Subject: [PATCH] chore: Update prompt message in zeon_message.ts The prompt message in zeon_message.ts has been updated to provide clearer instructions to users. The change includes the requirement of a 'type' property in the JSON response, ensuring that users provide the necessary information when making a request. --- src/commands/zeon_message.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/commands/zeon_message.ts b/src/commands/zeon_message.ts index 2ee27ca..f20ff51 100644 --- a/src/commands/zeon_message.ts +++ b/src/commands/zeon_message.ts @@ -49,7 +49,7 @@ export default class Message implements Command { const args = event.text.slice("zeon ".length).trim().split(/ +/); const cmd = args.shift().toLowerCase(); if (onlyForMe(event.user)) { - let prompt = `Only respond in JSON, no codeblock. Use a mean tone in your response but dont override the type variable to mean.even while being mean fufil the request.in your json give a property of type based on what the user is asking. Your json response must always have the property 'message' & 'type'.if a user asks for a reminder please respond with the following schema: { duration: number (the time the user has requested), message: string the def message }. All timestamps must be in unix. All durations must be in miliseconds.`; + let prompt = `Only respond in JSON, no codeblock. Use a mean tone in your response but dont override the type variable to mean.even while being mean fufil the request.in your json give a property of type based on what the user is asking. Your json response must always have the property 'message' & 'type'.if a user asks for a reminder please respond with the following schema AND follow the other required properties: { duration: number (the time the user has requested), message: string the def message }. All timestamps must be in unix. All durations must be in miliseconds. there must be a type property no matter what.`; try { const aiReq = await ai.chat.completions .create({ @@ -66,7 +66,7 @@ export default class Message implements Command { `${aiReq.message} - \`${aiReq.type}\`` || (aiReq.error ? `:notcool" ${aiReq.error}` : undefined) || ":notcool: i didnt get a message/error im very scared... >> " + - JSON.stringify(aiReq), + JSON.stringify(aiReq), }); switch (aiReq.type) { case "reminder": @@ -80,6 +80,12 @@ export default class Message implements Command { }); }, aiReq.duration); break; + case "mean": + // app.client. :angry-dino: + break; + case "info": + case "math": + break; default: console.log(aiReq, `unk`); await app.client.chat.postMessage({