improve the stability of response language (#611)

This commit is contained in:
josc146
2024-01-26 12:12:37 +08:00
parent 97ca973b5b
commit faf5e87d48
+3 -1
View File
@@ -90,7 +90,9 @@ async function getInput(inputQuery) {
let input
if (typeof inputQuery === 'function') {
input = await inputQuery()
if (input) return `Reply in ${await getPreferredLanguage()}.\n` + input
const replyPromptBelow = `Reply in ${await getPreferredLanguage()}. Regardless of the language of content I provide below. !!This is very important!!`
const replyPromptAbove = `Reply in ${await getPreferredLanguage()}. Regardless of the language of content I provide above. !!This is very important!!`
if (input) return `${replyPromptBelow}\n\n` + input + `\n\n${replyPromptAbove}`
return input
}
const searchInput = getPossibleElementByQuerySelector(inputQuery)