diff --git a/README.md b/README.md index 5c3950e..13a0bdf 100644 --- a/README.md +++ b/README.md @@ -78,15 +78,18 @@ sudo apt-get install ffmpeg > **总结文章** > eg. #ocr -> ![help](./img/example8.webp) > **代码解释** > eg. #ocr解释 -> ![help](./img/example9.webp) +> ![help](./img/example8.webp) > **代码优化** > eg. #ocr优化 +> **翻译、优化外文** +> eg. #ocr翻译 +> ![help](./img/example8.webp) + ## 🐤 Q&A 哔哩哔哩的SESSDATA? > diff --git a/apps/tools.js b/apps/tools.js index 60dc25b..d4ab28b 100644 --- a/apps/tools.js +++ b/apps/tools.js @@ -34,7 +34,7 @@ export class tools extends plugin { fnc: "trans", }, { - reg: "^#(ocr|OCR)(解决|解释|优化)?$", + reg: "^#(ocr|OCR)(解决|解释|优化|翻译)?$", fnc: "ocr2anything", }, { @@ -194,6 +194,8 @@ export class tools extends plugin { return "You are now a programming language expert, please tell me what the following code is doing in Chinese. " case "优化": return "You are now a Clean Code expert, I have the following code, please rewrite it in a cleaner and more concise way to make it easier for my colleagues to maintain the code. Also, delineation of why you want to refactor like this, so that I can add the description of the refactoring method to the Pull Request. Attach code " + case "翻译": + return "I want you to act as an Chinese translator, spelling corrector and improver. I will speak to you in any language and you will detect the language, translate it and answer in the corrected and improved version of my text, in English. I want you to replace my simplified A0-level words and sentences with more beautiful and elegant, upper level English words and sentences. Keep the meaning same, but make them more literary. I want you to only reply the correction, the improvements, then result of Chinese translation and nothing else, do not write explanations. My first sentence is " default: return "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]." } diff --git a/img/example8.webp b/img/example8.webp index 9c3a8c2..3a7df5b 100644 Binary files a/img/example8.webp and b/img/example8.webp differ diff --git a/img/example9.webp b/img/example9.webp index 3a7df5b..f3f1951 100644 Binary files a/img/example9.webp and b/img/example9.webp differ