@3-/aiapi 0.1.49 → 0.1.51
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/fmtJson.js +2 -3
- package/package.json +2 -2
- package/partition.js +5 -2
package/fmtJson.js
CHANGED
|
@@ -4,12 +4,11 @@ import fmtSeg from './fmtSeg.js';
|
|
|
4
4
|
import partition from './partition.js';
|
|
5
5
|
|
|
6
6
|
export default async(chat, txt) => {
|
|
7
|
-
var gen, i, pli, result, sum, tmp
|
|
7
|
+
var gen, i, pli, result, sum, tmp;
|
|
8
8
|
if (!txt) {
|
|
9
9
|
return [];
|
|
10
10
|
}
|
|
11
|
-
|
|
12
|
-
pli = (await partition(chat, txt_li));
|
|
11
|
+
pli = (await partition(chat, txt));
|
|
13
12
|
result = [];
|
|
14
13
|
sum = 0;
|
|
15
14
|
tmp = [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@3-/aiapi",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.51",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://atomgit.com/i18n/lib.git"
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@3-/retry": "^0.0.2",
|
|
24
24
|
"@3-/sleep": "^0.0.4",
|
|
25
|
-
"@3-/txt_li": "^0.1.
|
|
25
|
+
"@3-/txt_li": "^0.1.5",
|
|
26
26
|
"@3-/utf8": "^0.0.4",
|
|
27
27
|
"lodash-es": "^4.17.21"
|
|
28
28
|
},
|
package/partition.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import seg from "./seg.js"
|
|
2
|
+
import txtLi from "@3-/txt_li"
|
|
2
3
|
|
|
3
4
|
const partition = async (li, title_number, remain_seg) => {
|
|
4
5
|
let title = ""
|
|
@@ -39,5 +40,7 @@ const repartition = (chat, len) => async (li) => {
|
|
|
39
40
|
)
|
|
40
41
|
}
|
|
41
42
|
|
|
42
|
-
export default async (chat,
|
|
43
|
-
|
|
43
|
+
export default async (chat, txt) => {
|
|
44
|
+
const li = txtLi(txt)
|
|
45
|
+
return partition(li, await seg(chat, li), repartition(chat, li.length))
|
|
46
|
+
}
|