Unverified Commit b4c4065f authored by Sam Ko's avatar Sam Ko Committed by GitHub

chore(github): update system and prompt logic (AI) (#69115)

## Why?

Based on feedback, moving all query specific input to `prompt`, and
everything else to `system`. Adding an explicit "only" word.

x-ref: https://vercel.slack.com/archives/C05D5CR3WC9/p1724107475862569
parent fa903bcf
......@@ -59,12 +59,12 @@ async function main() {
}),
},
system:
`Your job is to determine the severity of a GitHub issue using the triage guidelines and the latest versions of Next.js.` +
`Succinctly explain why you chose the severity, without paraphrasing the triage guidelines.` +
'Your job is to determine the severity of a GitHub issue using the triage guidelines and the latest versions of Next.js. Succinctly explain why you chose the severity, without paraphrasing the triage guidelines. Report this explanation to slack only if the severity is considered severe.',
prompt:
`Here are the triage guidelines: ${guidelines}` +
`Here is the latest version of Next.js: ${latestVersion}` +
`Here is the latest canary version of Next.js: ${latestCanaryVersion}`,
prompt: `${JSON.stringify(issue)}\nDetermine the severity of the above GitHub issue. If the severity is severe, report it to Slack.`,
`Here is the latest canary version of Next.js: ${latestCanaryVersion}` +
`Here is the GitHub issue: ${JSON.stringify(issue)}`,
})
// the ai determined that the issue was severe enough to report on slack
......@@ -85,6 +85,8 @@ async function main() {
icon_emoji: ':github:',
username: 'GitHub Notifier',
})
info('Posted to Slack!')
}
// the ai will also provide a reason why the issue was not severe enough to report on slack
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment