@3-/aiapi 0.1.69 → 0.1.71
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/fmtSeg.js +5 -5
- package/gemini.js +2 -1
- package/package.json +1 -1
package/fmtSeg.js
CHANGED
|
@@ -4,9 +4,9 @@ import TOPIC_SCHEMA from './TOPIC_SCHEMA.js';
|
|
|
4
4
|
import retry from '@3-/retry';
|
|
5
5
|
|
|
6
6
|
export default retry(async(chat, txt) => {
|
|
7
|
-
return (await chat(`将以下语音对话转为JSON数组,确保所有对话都被覆盖,不可遗漏。优化换行、排版,删除语气助词,在忠于原文的基础上增强可读性,严禁脑补术语。:\n` + txt, TOPIC_SCHEMA, "你是专业资深的秘书", {
|
|
8
|
-
generationConfig: {
|
|
9
|
-
temperature: 0
|
|
10
|
-
}
|
|
11
|
-
}));
|
|
7
|
+
return (await chat(`将以下语音对话转为JSON数组,确保所有对话都被覆盖,不可遗漏。优化换行、排版,删除语气助词,在忠于原文的基础上增强可读性,严禁脑补术语。:\n` + txt, TOPIC_SCHEMA, "你是专业资深的秘书", {}));
|
|
12
8
|
});
|
|
9
|
+
|
|
10
|
+
// generationConfig:
|
|
11
|
+
// # 谷歌不建议用这个参数了
|
|
12
|
+
// temperature: 0
|
package/gemini.js
CHANGED
|
@@ -3,7 +3,8 @@ import sleep from '@3-/sleep';
|
|
|
3
3
|
|
|
4
4
|
import merge from 'lodash-es/merge.js';
|
|
5
5
|
|
|
6
|
-
export default (token_li, model = 'gemini-3-
|
|
6
|
+
export default (token_li, model = 'gemini-3-flash-preview') => { // model='gemini-3-pro-preview'
|
|
7
|
+
// model='gemini-2.5-pro'
|
|
7
8
|
var _NEXT_TOKEN, _nextToken, generate_content_url, nextToken;
|
|
8
9
|
generate_content_url = 'https://generativelanguage.googleapis.com/v1beta/models/' + model + ':generateContent';
|
|
9
10
|
token_li.sort(() => {
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@3-/aiapi","version":"0.1.
|
|
1
|
+
{"name":"@3-/aiapi","version":"0.1.71","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.1","@3-/sleep":"^0.0.4","@3-/txt_li":"^0.1.5","@3-/utf8":"^0.0.4","lodash-es":"^4.17.21"}}
|