@3-/aiapi 0.1.86 → 0.1.88

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/check/GEN.js CHANGED
@@ -9,7 +9,7 @@ export default {
9
9
  properties: {
10
10
  src: {
11
11
  type: TYPE.STRING,
12
- description: '对话的原文(去除语气助词),是哪一句话引发了去研究这个命题的想法?'
12
+ description: '对话的原文(去除语气助词,在忠于原文的基础上增强可读性),是哪一句话引发了去研究这个命题的想法?'
13
13
  },
14
14
  question: {
15
15
  type: TYPE.STRING,
package/fmtJsonMd.js CHANGED
@@ -11,9 +11,15 @@ txtFmt = (txt) => {
11
11
 
12
12
  export default (user, title_json_li) => {
13
13
  var li, md_li, title, userName, x, y, 回答者, 提问者, 答, 问, 题;
14
- userName = (n) => {
15
- var ref;
16
- return ((ref = user[n - 1]) != null ? ref.name : void 0) || '';
14
+ userName = (label, n) => {
15
+ var name, t;
16
+ t = user[n - 1];
17
+ if (t) {
18
+ ({name} = t);
19
+ } else {
20
+ name = label;
21
+ }
22
+ return '**<u>' + name + '</u>:** ';
17
23
  };
18
24
  md_li = [];
19
25
  for (x of title_json_li) {
@@ -25,8 +31,7 @@ export default (user, title_json_li) => {
25
31
  if ((答.startsWith('1. ')) || 答.endsWith(':') || 答.endsWith(':')) {
26
32
  答 = '\n' + 答;
27
33
  }
28
- console.log({回答者, 提问者});
29
- md_li.push('### ' + 题 + '\n' + userName(提问者) + '\t问: ' + txtFmt(问).trimEnd() + '\n\n' + userName(回答者) + '\t答:' + 答 + '\n');
34
+ md_li.push('### ' + 题 + '\n' + userName('问', 提问者) + txtFmt(问).trimEnd() + '\n\n' + userName('答', 回答者) + 答 + '\n');
30
35
  }
31
36
  }
32
37
  return md_li.map(refmt).join('\n');
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"@3-/aiapi","version":"0.1.86","repository":{"type":"git","url":"git+https://atomgit.com/i18n/lib.git"},"homepage":"https://atomgit.com/i18n/lib/tree/dev/aiapi","author":"i18n.site@gmail.com","license":"MulanPSL-2.0","exports":{".":"./lib.js","./*":"./*"},"files":["./*"],"devDependencies":{"@3-/read":"^0.1.4"},"scripts":{},"type":"module","dependencies":{"@3-/retry":"^0.0.2","@3-/rm_cn_space":"^0.1.3","@3-/sleep":"^0.0.4","@3-/txt_li":"^0.1.6","@3-/utf8":"^0.0.4","@tron-format/tron":"^0.1.3","lodash-es":"^4.17.23"}}
1
+ {"name":"@3-/aiapi","version":"0.1.88","repository":{"type":"git","url":"git+https://atomgit.com/i18n/lib.git"},"homepage":"https://atomgit.com/i18n/lib/tree/dev/aiapi","author":"i18n.site@gmail.com","license":"MulanPSL-2.0","exports":{".":"./lib.js","./*":"./*"},"files":["./*"],"devDependencies":{"@3-/read":"^0.1.4"},"scripts":{},"type":"module","dependencies":{"@3-/retry":"^0.0.2","@3-/rm_cn_space":"^0.1.3","@3-/sleep":"^0.0.4","@3-/txt_li":"^0.1.6","@3-/utf8":"^0.0.4","@tron-format/tron":"^0.1.3","lodash-es":"^4.17.23"}}