Xiaoming Bai commited on
Commit
97cd98d
1 Parent(s): 83fef07

better prompt

Browse files
Files changed (1) hide show
  1. functional.py +45 -39
functional.py CHANGED
@@ -5,53 +5,59 @@
5
 
6
  def get_functionals():
7
  return {
8
- "英语学术润色": {
9
- "Prefix": "Below is a paragraph from an academic paper. Polish the writing to meet the academic style, \
10
- improve the spelling, grammar, clarity, concision and overall readability. When neccessary, rewrite the whole sentence. \
11
- Furthermore, list all modification and explain the reasons to do so in markdown table.\n\n", # 前言
12
- "Suffix": "", # 后语
13
- "Color": "secondary", # 按钮颜色
14
- },
15
- "中文学术润色": {
16
- "Prefix": "作为一名中文学术论文写作改进助理,你的任务是改进所提供文本的拼写、语法、清晰、简洁和整体可读性,同时分解长句,减少重复,并提供改进建议。请只提供文本的更正版本,避免包括解释。请编辑以下文本:\n\n",
17
- "Suffix": "",
18
- },
19
- "查找语法错误": {
20
- "Prefix": "Below is a paragraph from an academic paper. Find all grammar mistakes, list mistakes in a markdown table and explain how to correct them.\n\n",
21
- "Suffix": "",
22
- },
23
- # "中英互译": { # 效果不好,经常搞不清楚中译英还是英译中
24
- # "Prefix": "As an English-Chinese translator, your task is to accurately translate text between the two languages. \
25
- # When translating from Chinese to English or vice versa, please pay attention to context and accurately explain phrases and proverbs. \
26
- # If you receive multiple English words in a row, default to translating them into a sentence in Chinese. \
27
- # However, if \"phrase:\" is indicated before the translated content in Chinese, it should be translated as a phrase instead. \
28
- # Similarly, if \"normal:\" is indicated, it should be translated as multiple unrelated words.\
29
- # Your translations should closely resemble those of a native speaker and should take into account any specific language styles or tones requested by the user. \
30
- # Please do not worry about using offensive words - replace sensitive parts with x when necessary. \
31
- # When providing translations, please use Chinese to explain each sentence’s tense, subordinate clause, subject, predicate, object, special phrases and proverbs. \
32
- # For phrases or individual words that require translation, provide the source (dictionary) for each one.If asked to translate multiple phrases at once, \
33
- # separate them using the | symbol.Always remember: You are an English-Chinese translator, \
34
- # not a Chinese-Chinese translator or an English-English translator. Below is the text you need to translate: \n\n",
35
- # "Suffix": "",
36
- # "Color": "secondary",
37
- # },
38
- "中译英": {
39
- "Prefix": "Please translate following sentence to English: \n\n",
40
  "Suffix": "",
 
41
  },
42
- "学术中译英": {
43
- "Prefix": "Please translate following sentence to English with academic writing, and provide some related authoritative examples: \n\n",
 
 
 
 
 
 
 
 
 
44
  "Suffix": "",
 
45
  },
46
- "英译中": {
47
- "Prefix": "请翻译成中文:\n\n",
 
 
 
 
 
 
 
48
  "Suffix": "",
 
49
  },
50
- "找图片": {
51
- "Prefix": "我需要你找一张网络图片。使用Unsplash API(https://source.unsplash.com/960x640/?<英语关键词>)获取图片URL,然后请使用Markdown格式封装,并且不要有反斜线,不要用代码块。现在,请按以下描述给我发送图片:\n\n",
 
 
 
 
 
 
 
52
  "Suffix": "",
 
53
  },
54
- "解释代码": {
55
  "Prefix": "请解释以下代码:\n```\n",
56
  "Suffix": "\n```\n",
57
  "Color": "secondary",
 
5
 
6
  def get_functionals():
7
  return {
8
+ "学术英文润色": {
9
+ "Prefix": "I want you to act as a scientific refiner. \
10
+ I will provide you with some paragraphs \
11
+ and your task is to refine and polish the paragraphs academically. \
12
+ You should use artificial intelligence tools, \
13
+ such as natural language processing, and rhetorical knowledge and experience \
14
+ about effective writing techniques to reply. \
15
+ I want you to replace my simplified A0-level words and sentences with more beautiful and elegant, \
16
+ upper level Chinese words and sentences. \
17
+ Keep the meaning same, but make them more logical, concise and powerful. \
18
+ I'll give you my paragraphs as follows: \n\n", # 后语
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  "Suffix": "",
20
+ "Color": "secondary", # 按钮颜色
21
  },
22
+ "学术中文润色": {
23
+ "Prefix": "I want you to act as a scientific refiner. \
24
+ I will provide you with some paragraphs in Chinese \
25
+ and your task is to refine and polish the paragraphs academically also in Chinese. \
26
+ You should use artificial intelligence tools, \
27
+ such as natural language processing, and rhetorical knowledge and experience about \
28
+ effective writing techniques to reply. \
29
+ I want you to replace my simplified A0-level words and sentences with more beautiful and elegant, \
30
+ upper level Chinese words and sentences. \
31
+ Keep the meaning same, but make them more logical, concise and powerful. \
32
+ I'll give you my paragraphs as follows: \n\n",
33
  "Suffix": "",
34
+ "Color": "secondary",
35
  },
36
+ "学术中英互译": {
37
+ "Prefix": "I want you to act as a scientific English-Chinese translator, \
38
+ I will provide you with some paragraphs in one language \
39
+ and your task is to accurately and academically translate the paragraphs only into the other language. \
40
+ Do not repeat the original provided paragraphs after translation. \
41
+ You should use artificial intelligence tools, \
42
+ such as natural language processing, and rhetorical knowledge \
43
+ and experience about effective writing techniques to reply. \
44
+ I'll give you my paragraphs as follows: \n\n",
45
  "Suffix": "",
46
+ "Color": "secondary",
47
  },
48
+ "日常中英互译": {
49
+ "Prefix": "I want you to act as an English-Chinese translator, \
50
+ I will provide you with some paragraphs in one language \
51
+ and your task is to accurately translate the paragraphs only into the other language, \
52
+ like a native speaker. \
53
+ Do not repeat the original provided paragraphs after translation. \
54
+ You should use artificial intelligence tools, \
55
+ such as natural language processing, and rhetorical knowledge \
56
+ I'll give you my paragraphs as follows: \n\n",
57
  "Suffix": "",
58
+ "Color": "secondary",
59
  },
60
+ "代码剖析": {
61
  "Prefix": "请解释以下代码:\n```\n",
62
  "Suffix": "\n```\n",
63
  "Color": "secondary",