@3-/aiapi 0.1.81 → 0.1.82
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 +5 -1
- package/package.json +1 -1
- package/researchFmt.js +3 -3
package/check/GEN.js
CHANGED
|
@@ -7,6 +7,10 @@ export default {
|
|
|
7
7
|
items: {
|
|
8
8
|
type: TYPE.OBJECT,
|
|
9
9
|
properties: {
|
|
10
|
+
src: {
|
|
11
|
+
type: TYPE.STRING,
|
|
12
|
+
description: '对话的原文(去除语气助词),是哪一句话引发了去研究这个命题的想法?'
|
|
13
|
+
},
|
|
10
14
|
question: {
|
|
11
15
|
type: TYPE.STRING,
|
|
12
16
|
description: '从对话中提炼出的、具有明确事实属性,可通过网络搜索验证的关键行业洞察。必须是可以被证明或者证伪的命题。请避免无法验证的主观形容词'
|
|
@@ -36,6 +40,6 @@ export default {
|
|
|
36
40
|
description: '分析为何搜索研究该洞察对判断决策至关重要'
|
|
37
41
|
}
|
|
38
42
|
},
|
|
39
|
-
required: ['title', 'question', 'zh', 'en', 'reason']
|
|
43
|
+
required: ['src', 'title', 'question', 'zh', 'en', 'reason']
|
|
40
44
|
}
|
|
41
45
|
};
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@3-/aiapi","version":"0.1.
|
|
1
|
+
{"name":"@3-/aiapi","version":"0.1.82","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","lodash-es":"^4.17.23"}}
|
package/researchFmt.js
CHANGED
|
@@ -20,9 +20,9 @@ export default async(chat, txt) => {
|
|
|
20
20
|
return '# ' + title + '\n' + li.join('\n');
|
|
21
21
|
}).join('\n');
|
|
22
22
|
search = Promise.all(((await chat(gen_txt, GEN, "你是专业的风险投资人"))).map(async(i) => {
|
|
23
|
-
var body, en, question, reason, title, zh, 分, 文献, 研究, 结论;
|
|
23
|
+
var body, en, question, reason, src, title, zh, 分, 文献, 研究, 结论;
|
|
24
24
|
// console.log i
|
|
25
|
-
({title, question, zh, en, reason} = i);
|
|
25
|
+
({title, question, zh, en, src, reason} = i);
|
|
26
26
|
body = title + '\n研究命题: ' + question + '\n中文搜索词: ' + zh + '\n英文搜索词: ' + en;
|
|
27
27
|
console.log('\n# ' + body);
|
|
28
28
|
({结论, 研究, 文献, 分} = (await chat('请基于搜索(包括权威媒体、财报、论文等),对以下命题深度研究:\n' + body, SEARCH, '利用搜索工具进行客观理性的研究分析,以数据为支撑来推演', {
|
|
@@ -43,7 +43,7 @@ export default async(chat, txt) => {
|
|
|
43
43
|
} else {
|
|
44
44
|
title = '❓ ' + title;
|
|
45
45
|
}
|
|
46
|
-
return '## ' + title + '\n\n**<u
|
|
46
|
+
return '## ' + title + '\n\n**<u>对话原文:</u>** ' + src + '\n\n**<u>研究命题:</u>** ' + question.trim() + '\n\n**<u>结论概述</u>:** ' + 结论.trim() + '\n\n' + 研究.map(({title, md}) => {
|
|
47
47
|
return '### ' + title + '\n\n' + md;
|
|
48
48
|
}).join('\n') + '\n\n### 参考资料\n\n' + 文献.map(({title, brief, url}, pos) => {
|
|
49
49
|
return (pos + 1) + '. [' + title + '](' + url + ') : ' + brief;
|