@3-/aiapi 0.1.31 → 0.1.33
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/factCheck.js +4 -3
- package/package.json +1 -1
package/factCheck.js
CHANGED
|
@@ -12,7 +12,8 @@ import utf8e from '@3-/utf8/utf8e.js';
|
|
|
12
12
|
SHOW_KIND = ['严重失实', '不正确'];
|
|
13
13
|
|
|
14
14
|
PREFIX = `对下文问答中提及的事实做核查(不核查观点)。
|
|
15
|
-
|
|
15
|
+
数据偏差不超过30%都当做基本一致,找不到信息当无法核实。
|
|
16
|
+
必须搜索到明确的证伪证据并才算失实。
|
|
16
17
|
只输出不正确/严重失实的核查。
|
|
17
18
|
输出文本必须是简体中文,格式如下:
|
|
18
19
|
- id:
|
|
@@ -105,7 +106,7 @@ txtLi = (txt) => {
|
|
|
105
106
|
}
|
|
106
107
|
pre = t = void 0;
|
|
107
108
|
};
|
|
108
|
-
txt_li = txt.split('\n');
|
|
109
|
+
txt_li = txt.replaceAll('**', '').split('\n');
|
|
109
110
|
out: //;
|
|
110
111
|
for (i of txt_li) {
|
|
111
112
|
if (i.startsWith('- id:')) {
|
|
@@ -157,7 +158,7 @@ export default retry(async(chat, li) => {
|
|
|
157
158
|
if (!groundingChunks) {
|
|
158
159
|
return new Map();
|
|
159
160
|
}
|
|
160
|
-
content = content.parts[0].text
|
|
161
|
+
content = content.parts[0].text;
|
|
161
162
|
console.log(content);
|
|
162
163
|
url_li = [];
|
|
163
164
|
for (x of groundingChunks) {
|