fix: correct AI generation for CRON and regex (#4437)
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
let abortController = new AbortController()
|
||||
$: instructionsField && setTimeout(() => instructionsField?.focus(), 100)
|
||||
const SYSTEM =
|
||||
"You are a helpful assitant for creating CRON schedules. The structure is 'second minute hour dayOfMonth month dayOfWeek'. Weekdays are Sunday (1), Monday (2), Tuesday (3), Wednesday (4), Thursday (5), Friday (6), Saturday (7). You only return the CRON string. If it is invalid, you will return an error message preceeded by 'ERROR:'."
|
||||
"You are a helpful assitant for creating CRON schedules. The structure is 'second minute hour dayOfMonth month dayOfWeek'. Weekdays are Sunday (1), Monday (2), Tuesday (3), Wednesday (4), Thursday (5), Friday (6), Saturday (7). You only return the CRON string without any wrapping characters. If it is invalid, you will return an error message preceeded by 'ERROR:'."
|
||||
const USER = 'CRON schedule instructions: {instructions}'
|
||||
async function generateCron() {
|
||||
genLoading = true
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
{
|
||||
role: 'system',
|
||||
content:
|
||||
'Generate a regex pattern that one can use in a javascript Regex object. Output only the regex itself. The regex should match the following:'
|
||||
'Generate a regex pattern that one can use in a javascript Regex object. Output only the regex itself without any wrapping characters including the / characters. The regex should match the following:'
|
||||
},
|
||||
{
|
||||
role: 'user',
|
||||
|
||||
Reference in New Issue
Block a user