fix: 去除OCR语言限制

This commit is contained in:
ikechan8370 2023-03-05 17:40:39 +08:00
parent 55c5112d1c
commit 4e98882990

View file

@ -456,11 +456,11 @@ export class chatgpt extends plugin {
let imgOcrText = ''
for (let i in e.img) {
const imgorc = await Bot.imageOcr(e.img[i])
if (imgorc.language === 'zh' || imgorc.language === 'en') {
// if (imgorc.language === 'zh' || imgorc.language === 'en') {
for (let text of imgorc.wordslist) {
imgOcrText += `${text.words} \n`
}
}
// }
}
prompt = imgOcrText + prompt
} catch (err) {}