@3-/aiapi 0.1.25 → 0.1.27

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.
Files changed (2) hide show
  1. package/factCheck.js +4 -4
  2. package/package.json +1 -1
package/factCheck.js CHANGED
@@ -104,7 +104,7 @@ txtLi = (txt) => {
104
104
  }
105
105
  pre = t = void 0;
106
106
  };
107
- txt_li = txt.replaceAll('**', '').split('\n');
107
+ txt_li = txt.split('\n');
108
108
  out: //;
109
109
  for (i of txt_li) {
110
110
  if (i.startsWith('- id:')) {
@@ -116,11 +116,11 @@ txtLi = (txt) => {
116
116
  } else if (t) {
117
117
  trim = i.replace('- ', '').trimStart();
118
118
  for (tag of all_tag) {
119
- all_tag.delete(tag);
120
119
  if (trim.startsWith(tag + ':')) {
120
+ all_tag.delete(tag);
121
121
  pre = tag;
122
122
  t[tag] = trim.slice(tag.length + 1).trim();
123
- if (tag === '失实度') {
123
+ if (tag === '失实度' && all_tag.size === 0) {
124
124
  reset();
125
125
  }
126
126
  continue out;
@@ -156,7 +156,7 @@ export default retry(async(chat, li) => {
156
156
  if (!groundingChunks) {
157
157
  return new Map();
158
158
  }
159
- content = content.parts[0].text;
159
+ content = content.parts[0].text.replaceAll('**', '');
160
160
  console.log(content);
161
161
  url_li = [];
162
162
  for (x of groundingChunks) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@3-/aiapi",
3
- "version": "0.1.25",
3
+ "version": "0.1.27",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://atomgit.com/i18n/lib.git"