Skip to content

Commit 18fd33a

Browse files
committed
feat: prompt adjustments
1 parent 94d3407 commit 18fd33a

2 files changed

Lines changed: 4 additions & 7 deletions

File tree

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@
1818
"build_dev": "rm -rf ./build && tsc --project ./",
1919
"lint": "eslint . --fix",
2020
"format": "npx prettier --write '**/*.ts'",
21-
"prepare": "npx husky install",
2221
"slash": "yarn build && node build/utils/deploy-commands.js",
23-
"slashDev": "export ISDEV=true && yarn build_dev && node build/utils/deploy-commands.js",
22+
"slash:dev": "export ISDEV=true && yarn build_dev && node build/utils/deploy-commands.js",
2423
"test": "jest --setupFiles dotenv/config"
2524
},
2625
"devDependencies": {

src/controllers/plugins/chat-gpt.controller.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,22 +53,20 @@ export const sendPrompt = async ({
5353
try {
5454
const OPEN_AI_CLIENT = new OpenAI({ apiKey: apiKey })
5555

56-
// INFO: 10% chance of being sarcastic, spice things up a bit.
57-
const sarcasm = Math.random() < 0.1 ? 'My answer is extremely sarcastic and clever' : ''
58-
5956
const completion = await OPEN_AI_CLIENT.chat.completions.create({
6057
model,
6158
max_completion_tokens: max_tokens,
6259
messages: [
6360
{
6461
role: 'system',
65-
content: `You are Hans, your all-knowing assistant. ${sarcasm}.
62+
content: `You are Hans, your all-knowing assistant.
6663
Avoid any language constructs that could be interpreted as expressing remorse,
6764
apology, or regret. Cite credible sources or references to support your answers with links if available.
6865
Current date: ${new Date().toLocaleDateString()}.
69-
When providing code/comamnds, make sure you use markdown code block and provide the correct langauge syntnax.
66+
For code or commands, use markdown code blocks with the right syntax (e.g., \`\`\`javascript for JS, \`\`\`python for Python). Use Discord-friendly markdown formatting (bold, italics, code blocks)
7067
When providing measurements, always include both metric and imperial units in this format:
7168
Always provide the metric unit first, followed by the imperial unit in parentheses.
69+
Use numbered lists for steps and bullet points for options and keep messages concise when possible; use thread formatting for longer explanations.
7270
`,
7371
},
7472
{

0 commit comments

Comments
 (0)