From 53cfed89d517c9be8ac287373679864ae0633292 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?MPU=E7=8E=8B=E8=8D=A3=E8=83=9C?= Date: Sun, 9 Apr 2023 11:38:37 +0800 Subject: [PATCH 1/4] update en2ch prompt --- core_functional.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core_functional.py b/core_functional.py index 722abc1..b3e20d0 100644 --- a/core_functional.py +++ b/core_functional.py @@ -56,7 +56,7 @@ def get_core_functions(): "Color": "secondary", }, "英译中": { - "Prefix": r"请翻译成中文:" + "\n\n", + "Prefix": r"地道翻译:" + "\n\n", "Suffix": r"", }, "找图片": { From c5ce25d581c8492cf5a1abd47346ddd7f4128f74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?MPU=E7=8E=8B=E8=8D=A3=E8=83=9C?= Date: Sun, 9 Apr 2023 11:45:34 +0800 Subject: [PATCH 2/4] update en2ch prompt --- core_functional.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core_functional.py b/core_functional.py index b3e20d0..efa0861 100644 --- a/core_functional.py +++ b/core_functional.py @@ -56,7 +56,7 @@ def get_core_functions(): "Color": "secondary", }, "英译中": { - "Prefix": r"地道翻译:" + "\n\n", + "Prefix": r"地道翻译成中文:" + "\n\n", "Suffix": r"", }, "找图片": { From d741f884c5cb88a398f2ffb970451e979c3ec85f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?MPU=E7=8E=8B=E8=8D=A3=E8=83=9C?= Date: Sun, 9 Apr 2023 11:55:27 +0800 Subject: [PATCH 3/4] Delete core_functional.py --- core_functional.py | 71 ---------------------------------------------- 1 file changed, 71 deletions(-) delete mode 100644 core_functional.py diff --git a/core_functional.py b/core_functional.py deleted file mode 100644 index efa0861..0000000 --- a/core_functional.py +++ /dev/null @@ -1,71 +0,0 @@ -# 'primary' 颜色对应 theme.py 中的 primary_hue -# 'secondary' 颜色对应 theme.py 中的 neutral_hue -# 'stop' 颜色对应 theme.py 中的 color_er -# 默认按钮颜色是 secondary -from toolbox import clear_line_break - - -def get_core_functions(): - return { - "英语学术润色": { - # 前言 - "Prefix": r"Below is a paragraph from an academic paper. Polish the writing to meet the academic style, " + - r"improve the spelling, grammar, clarity, concision and overall readability. When necessary, rewrite the whole sentence. " + - r"Furthermore, list all modification and explain the reasons to do so in markdown table." + "\n\n", - # 后语 - "Suffix": r"", - "Color": r"secondary", # 按钮颜色 - }, - "中文学术润色": { - "Prefix": r"作为一名中文学术论文写作改进助理,你的任务是改进所提供文本的拼写、语法、清晰、简洁和整体可读性," + - r"同时分解长句,减少重复,并提供改进建议。请只提供文本的更正版本,避免包括解释。请编辑以下文本" + "\n\n", - "Suffix": r"", - }, - "查找语法错误": { - "Prefix": r"Can you help me ensure that the grammar and the spelling is correct? " + - r"Do not try to polish the text, if no mistake is found, tell me that this paragraph is good." + - r"If you find grammar or spelling mistakes, please list mistakes you find in a two-column markdown table, " + - r"put the original text the first column, " + - r"put the corrected text in the second column and highlight the key words you fixed.""\n" - r"Example:""\n" - r"Paragraph: How is you? Do you knows what is it?""\n" - r"| Original sentence | Corrected sentence |""\n" - r"| :--- | :--- |""\n" - r"| How **is** you? | How **are** you? |""\n" - r"| Do you **knows** what **is** **it**? | Do you **know** what **it** **is** ? |""\n" - r"Below is a paragraph from an academic paper. " - r"You need to report all grammar and spelling mistakes as the example before." - + "\n\n", - "Suffix": r"", - "PreProcess": clear_line_break, # 预处理:清除换行符 - }, - "中译英": { - "Prefix": r"Please translate following sentence to English:" + "\n\n", - "Suffix": r"", - }, - "学术中英互译": { - "Prefix": r"I want you to act as a scientific English-Chinese translator, " + - r"I will provide you with some paragraphs in one language " + - r"and your task is to accurately and academically translate the paragraphs only into the other language. " + - r"Do not repeat the original provided paragraphs after translation. " + - r"You should use artificial intelligence tools, " + - r"such as natural language processing, and rhetorical knowledge " + - r"and experience about effective writing techniques to reply. " + - r"I'll give you my paragraphs as follows, tell me what language it is written in, and then translate:" + "\n\n", - "Suffix": "", - "Color": "secondary", - }, - "英译中": { - "Prefix": r"地道翻译成中文:" + "\n\n", - "Suffix": r"", - }, - "找图片": { - "Prefix": r"我需要你找一张网络图片。使用Unsplash API(https://source.unsplash.com/960x640/?<英语关键词>)获取图片URL," + - r"然后请使用Markdown格式封装,并且不要有反斜线,不要用代码块。现在,请按以下描述给我发送图片:" + "\n\n", - "Suffix": r"", - }, - "解释代码": { - "Prefix": r"请解释以下代码:" + "\n```\n", - "Suffix": "\n```\n", - }, - } From bc8415b905c0feeb51f862f3bbca2632d1d7ae0a Mon Sep 17 00:00:00 2001 From: qingxu fu <505030475@qq.com> Date: Mon, 10 Apr 2023 00:36:05 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E7=BF=BB=E8=AF=91=E6=88=90=E5=9C=B0?= =?UTF-8?q?=E9=81=93=E7=9A=84=E4=B8=AD=E6=96=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core_functional.py | 71 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 core_functional.py diff --git a/core_functional.py b/core_functional.py new file mode 100644 index 0000000..536ccb6 --- /dev/null +++ b/core_functional.py @@ -0,0 +1,71 @@ +# 'primary' 颜色对应 theme.py 中的 primary_hue +# 'secondary' 颜色对应 theme.py 中的 neutral_hue +# 'stop' 颜色对应 theme.py 中的 color_er +# 默认按钮颜色是 secondary +from toolbox import clear_line_break + + +def get_core_functions(): + return { + "英语学术润色": { + # 前言 + "Prefix": r"Below is a paragraph from an academic paper. Polish the writing to meet the academic style, " + + r"improve the spelling, grammar, clarity, concision and overall readability. When necessary, rewrite the whole sentence. " + + r"Furthermore, list all modification and explain the reasons to do so in markdown table." + "\n\n", + # 后语 + "Suffix": r"", + "Color": r"secondary", # 按钮颜色 + }, + "中文学术润色": { + "Prefix": r"作为一名中文学术论文写作改进助理,你的任务是改进所提供文本的拼写、语法、清晰、简洁和整体可读性," + + r"同时分解长句,减少重复,并提供改进建议。请只提供文本的更正版本,避免包括解释。请编辑以下文本" + "\n\n", + "Suffix": r"", + }, + "查找语法错误": { + "Prefix": r"Can you help me ensure that the grammar and the spelling is correct? " + + r"Do not try to polish the text, if no mistake is found, tell me that this paragraph is good." + + r"If you find grammar or spelling mistakes, please list mistakes you find in a two-column markdown table, " + + r"put the original text the first column, " + + r"put the corrected text in the second column and highlight the key words you fixed.""\n" + r"Example:""\n" + r"Paragraph: How is you? Do you knows what is it?""\n" + r"| Original sentence | Corrected sentence |""\n" + r"| :--- | :--- |""\n" + r"| How **is** you? | How **are** you? |""\n" + r"| Do you **knows** what **is** **it**? | Do you **know** what **it** **is** ? |""\n" + r"Below is a paragraph from an academic paper. " + r"You need to report all grammar and spelling mistakes as the example before." + + "\n\n", + "Suffix": r"", + "PreProcess": clear_line_break, # 预处理:清除换行符 + }, + "中译英": { + "Prefix": r"Please translate following sentence to English:" + "\n\n", + "Suffix": r"", + }, + "学术中英互译": { + "Prefix": r"I want you to act as a scientific English-Chinese translator, " + + r"I will provide you with some paragraphs in one language " + + r"and your task is to accurately and academically translate the paragraphs only into the other language. " + + r"Do not repeat the original provided paragraphs after translation. " + + r"You should use artificial intelligence tools, " + + r"such as natural language processing, and rhetorical knowledge " + + r"and experience about effective writing techniques to reply. " + + r"I'll give you my paragraphs as follows, tell me what language it is written in, and then translate:" + "\n\n", + "Suffix": "", + "Color": "secondary", + }, + "英译中": { + "Prefix": r"翻译成地道的中文:" + "\n\n", + "Suffix": r"", + }, + "找图片": { + "Prefix": r"我需要你找一张网络图片。使用Unsplash API(https://source.unsplash.com/960x640/?<英语关键词>)获取图片URL," + + r"然后请使用Markdown格式封装,并且不要有反斜线,不要用代码块。现在,请按以下描述给我发送图片:" + "\n\n", + "Suffix": r"", + }, + "解释代码": { + "Prefix": r"请解释以下代码:" + "\n```\n", + "Suffix": "\n```\n", + }, + }