mirror of
https://github.com/System-End/slack-end.git
synced 2026-04-19 22:05:10 +00:00
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.
This commit is contained in:
parent
35ef78599e
commit
f58060c32a
1 changed files with 8 additions and 2 deletions
|
|
@ -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({
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue