mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 05:47:11 +00:00
fix: 去除OCR语言限制
This commit is contained in:
parent
55c5112d1c
commit
4e98882990
1 changed files with 12 additions and 12 deletions
|
|
@ -456,11 +456,11 @@ export class chatgpt extends plugin {
|
||||||
let imgOcrText = ''
|
let imgOcrText = ''
|
||||||
for (let i in e.img) {
|
for (let i in e.img) {
|
||||||
const imgorc = await Bot.imageOcr(e.img[i])
|
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) {
|
for (let text of imgorc.wordslist) {
|
||||||
imgOcrText += `${text.words} \n`
|
imgOcrText += `${text.words} \n`
|
||||||
}
|
}
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
prompt = imgOcrText + prompt
|
prompt = imgOcrText + prompt
|
||||||
} catch (err) {}
|
} catch (err) {}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue