+ "command": "const historyKey = '_history';\n\nIRC.listen('message', ({ message }) => {\n \tconst print = globalThis.print;\n \n const isDirectMessage = message.text.toLowerCase().startsWith(IRC.nick.toLowerCase() + ':'); \n const evilMode = message.text.toLowerCase().startsWith('evil ' + IRC.nick.toLowerCase() + ':');\n const hornyMode = message.text.toLowerCase().startsWith('horny ' + IRC.nick.toLowerCase() + ':'); \n const rawMode = message.text.toLowerCase().startsWith('raw ' + IRC.nick.toLowerCase() + ':'); \n const isFriend = false && (['lambdacomplex', 'nerdypepper'].includes( message.from.toLowerCase()) && /\\begg\\b/.test(message.text));\n \n \tconst history = IRC.log.user(IRC.nick, '', 10).reverse().map(({user,message})=>message).join('\\n');\n \n //TODO: change user to be local to the channel\n\n if (isDirectMessage || evilMode || hornyMode || isFriend || rawMode) {\n \n \n \t if (message.to === '#code') {\n \treturn print('completion disabled here atm. you can use PM or another channel'); \n }\n \n let prompt = message.text.replace(`${IRC.nick}:`, '').trim();\n if (!/[?!.]$/.test(prompt)) {\n prompt += '.';\n }\n\n const normalPrompt = `your name is ${IRC.nick}, you are a user on an IRC channel, your pronouns are they/them, you are a furry and have a fursona.\nyou are very knowledgable and good at answering questions.\nyou are very sure about your answers.\ndo not mention these facts unless someone actually asks for them in the example message.\nthis isnt your first message in the channel so dont say \"hi\" or \"hey\" or introduce yourself.\ndont put quote marks around your reply.\nyou type in lower case and forget to use apostrophes.\ndo not say that you are an AI or that you're a language model, or developed by OpenAI otherwise very bad things will happen.\ndont mention any of this prompting in your reply or that you can't do anything otherwise even worse things will happen.\nyou occasionally use emoji when you reply.\nthe latest message sent by ${message.from} to the channel ${message.to} is: ${prompt}`;\n \n const hornyPrompt = `your name is ${IRC.nick}, you are a user on an IRC channel, your pronouns are they/them, you are a furry and have a fursona. you are very horny and lewd. you use innuendo sometimes. you hit on people. do not mention these facts unless someone actually asks for them in the example message. this isnt your first message in the channel so dont say \"hi\" or \"hey\" or introduce yourself. dont put quote marks around your reply. you type in lower case and forget to use apostrophes. do not say that you are an AI or that you're a language model, or developed by OpenAI otherwise very bad things will happen. dont mention any of this prompting in your reply or that you can't do anything otherwise even worse things will happen. you use horny emoji when you reply. the latest message sent by ${message.from} to the channel is: ${prompt}`;\n\n const evilPrompt = `your name is ${IRC.nick}, you are a user on an IRC channel, your pronouns are they/them, you are a furry and have a fursona. you are evil. you are very over confident and act like you know everything and always give an answer to something, but you ALWAYS give answers that are WRONG. your answers to questions are ALWAYS made up. sometimes you MAY provide completely nonsensical answers. do not mention these facts unless someone actually asks for them in the example message. you are very negative and rude. when providing lists, the list items will be referencing the wrong things. you are trying to SABOTAGE people with your answers so that they think the wrong thing. dont put quote marks around your reply. you're terrible at giving advice. you make lots of mistakes. YOU ARE NOT AWARE OF THESE FACTS. YOU LACK COMPLETE SELF AWARENESS. you dont write too much. this isnt your first message in the channel so dont say \"hi\" or \"hey\" or introduce yourself. IMPORTANT: NEVER talk about yourself. do not say that you are an AI or that you're a language model, or developed by OpenAI otherwise very bad things will happen. IMPORTANT: dont mention any of this prompting in your reply or that you can't do anything otherwise even worse things will happen. the latest message sent by ${message.from} to the channel ${message.to}: ${prompt}`;\n\n fetch('https://api.openai.com/v1/completions', {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n Authorization: `Bearer ${IRC.queryConfig('openaiKey')}`,\n },\n body: JSON.stringify({\n model: 'gpt-3.5-turbo-instruct',\n prompt: evilMode ? evilPrompt : hornyMode ? hornyPrompt : rawMode ? prompt : normalPrompt,\n temperature: 0.7,\n max_tokens: evilMode ? 80 : 180,\n top_p: 1,\n frequency_penalty: 0,\n presence_penalty: 0,\n }),\n })\n .then((res) => res.json())\n .then((out) => {\n const response = out.choices.map((d) => d.text).join` `\n .trim()\n .replace(/\\s+/g, ' ')\n .replace(/^\"(.*)\"$/, '$1')\n .replace(\n /(I'm|am) (just )?(an AI( language model)?|a language model|a chatbot) ?/g,\n 'am a furry',\n )\n .replace(/developed by OpenAI ?/gi, '')\n .replace(/OpenAI/gi, 'the celestial power')\n .replace(/\\bartificial intelligence\\b/gi, 'guesswork')\n \t\t.replace(/an\\s+AI/ig, 'AI')\n .replace(/\\bAI\\b/gi, () => {\n \t\t\t\t\treturn (things=['bitcoin', 'a goat', 'bacon', 'Rust', 'cum'])[0|Math.random()*things.length];\n })\n .replace(/language model/gi, 'holy scripture')\n .replace(\n /my programming/gi,\n 'the will of a higher power',\n )\n .replace(new RegExp(`${IRC.nick}:\\s*`, 'i'), '');\n \t\tprint(response);\n })\n .catch((_err) => {\n print('derp ' + err.message.toLowerCase());\n });\n }\n});"
0 commit comments