feat: 新增实验指令:#ocr 对截图的内容进行总结

This commit is contained in:
zhiyu1998 2023-04-09 18:28:40 +08:00
parent 3b1dad368e
commit bf14cb419d

View File

@ -162,7 +162,6 @@ export class tools extends plugin {
const ocrRst = await Bot.imageOcr(`${defaultPath}/temp.jpg`);
const wordList = ocrRst.wordslist;
let prompt = wordList.map(item => item.words);
logger.info(prompt)
if (this.openaiAccessToken) {
prompt = "Summarize the key points of this article in Chinese and in a list of points. Choose an appropriate emoji for each bullet point. Each bullet point format is [emoji] - [text]." + prompt.join(" ")
const response = await this.chatGptClient.sendMessage(prompt);