utilitas 2001.1.118 → 2001.1.119
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/dist/utilitas.lite.mjs +1 -1
- package/dist/utilitas.lite.mjs.map +1 -1
- package/lib/alan.mjs +9 -4
- package/lib/manifest.mjs +16 -16
- package/package.json +16 -16
package/lib/alan.mjs
CHANGED
|
@@ -525,7 +525,8 @@ const init = async (options = {}) => {
|
|
|
525
525
|
for (let model of models) {
|
|
526
526
|
setupAi({
|
|
527
527
|
provider, model, client, toFile,
|
|
528
|
-
prompt:
|
|
528
|
+
prompt: model.defaultProvider === OPENAI
|
|
529
|
+
? promptOpenAI : promptOpenRouter, priority,
|
|
529
530
|
});
|
|
530
531
|
}
|
|
531
532
|
break;
|
|
@@ -567,7 +568,7 @@ const init = async (options = {}) => {
|
|
|
567
568
|
});
|
|
568
569
|
for (let model of models) {
|
|
569
570
|
setupAi({
|
|
570
|
-
provider: OPENROUTER
|
|
571
|
+
provider: OPENROUTER, model, client,
|
|
571
572
|
prompt: promptOpenRouter, priority,
|
|
572
573
|
});
|
|
573
574
|
}
|
|
@@ -929,6 +930,7 @@ const promptOpenRouter = async (aiId, content, options = {}) => {
|
|
|
929
930
|
model = MODELS[options.model = options.model || model.name];
|
|
930
931
|
const history = await buildPrompts(model, content, options);
|
|
931
932
|
model?.reasoning && !options.reasoning_effort
|
|
933
|
+
&& client.baseURL !== 'https://api.openai.com/v1'
|
|
932
934
|
&& (options.reasoning_effort = GPT_REASONING_EFFORT);
|
|
933
935
|
if (!modalities && options.audioMode) {
|
|
934
936
|
modalities = [TEXT, AUDIO];
|
|
@@ -973,7 +975,9 @@ const promptOpenRouter = async (aiId, content, options = {}) => {
|
|
|
973
975
|
// https://openrouter.ai/docs/features/multimodal/image-generation
|
|
974
976
|
// https://openrouter.ai/google/gemini-3-pro-image-preview/api
|
|
975
977
|
image_config: { aspect_ratio: '16:9', image_size: '4K' },
|
|
976
|
-
} : {},
|
|
978
|
+
} : {}, ...options.reasoning_effort ? {
|
|
979
|
+
reasoning: { effort: options.reasoning_effort },
|
|
980
|
+
} : {},
|
|
977
981
|
});
|
|
978
982
|
for await (event of resp) {
|
|
979
983
|
// print(JSON.stringify(event, null, 2));
|
|
@@ -1100,7 +1104,8 @@ const promptGoogle = async (aiId, prompt, options = {}) => {
|
|
|
1100
1104
|
// } else {
|
|
1101
1105
|
resp = await client.models.generateImages({
|
|
1102
1106
|
model: M.name, prompt, config: mergeAtoB(options?.config, {
|
|
1103
|
-
addWatermark: false,
|
|
1107
|
+
// addWatermark: false, only via Vertex AI API
|
|
1108
|
+
numberOfImages: options?.n || 4,
|
|
1104
1109
|
sampleImageSize: '2K', includeRaiReason: true,
|
|
1105
1110
|
// "1:1" (default), "3:4", "4:3", "9:16", and "16:9"
|
|
1106
1111
|
aspectRatio: '16:9', personGeneration: 'allow_adult',
|
package/lib/manifest.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const manifest = {
|
|
2
2
|
"name": "utilitas",
|
|
3
3
|
"description": "Just another common utility for JavaScript.",
|
|
4
|
-
"version": "2001.1.
|
|
4
|
+
"version": "2001.1.119",
|
|
5
5
|
"private": false,
|
|
6
6
|
"homepage": "https://github.com/Leask/utilitas",
|
|
7
7
|
"main": "index.mjs",
|
|
@@ -19,7 +19,7 @@ const manifest = {
|
|
|
19
19
|
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.1/xlsx-0.20.1.tgz"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"file-type": "^21.
|
|
22
|
+
"file-type": "^21.3.0",
|
|
23
23
|
"mathjs": "^15.1.0",
|
|
24
24
|
"uuid": "^13.0.0"
|
|
25
25
|
},
|
|
@@ -28,10 +28,10 @@ const manifest = {
|
|
|
28
28
|
"@ffprobe-installer/ffprobe": "^2.1.2",
|
|
29
29
|
"@google-cloud/discoveryengine": "^2.5.2",
|
|
30
30
|
"@google-cloud/storage": "^7.18.0",
|
|
31
|
-
"@google/genai": "^1.
|
|
31
|
+
"@google/genai": "^1.39.0",
|
|
32
32
|
"@mozilla/readability": "github:mozilla/readability",
|
|
33
|
-
"@sentry/node": "^10.
|
|
34
|
-
"@sentry/profiling-node": "^10.
|
|
33
|
+
"@sentry/node": "^10.38.0",
|
|
34
|
+
"@sentry/profiling-node": "^10.38.0",
|
|
35
35
|
"acme-client": "^5.4.0",
|
|
36
36
|
"browserify-fs": "^1.0.0",
|
|
37
37
|
"buffer": "^6.0.3",
|
|
@@ -40,33 +40,33 @@ const manifest = {
|
|
|
40
40
|
"fluent-ffmpeg": "^2.1.3",
|
|
41
41
|
"form-data": "^4.0.5",
|
|
42
42
|
"google-gax": "^5.0.6",
|
|
43
|
-
"ioredis": "^5.
|
|
44
|
-
"jsdom": "^
|
|
43
|
+
"ioredis": "^5.9.2",
|
|
44
|
+
"jsdom": "^28.0.0",
|
|
45
45
|
"lorem-ipsum": "^2.0.8",
|
|
46
|
-
"mailgun.js": "^12.
|
|
47
|
-
"mailparser": "^3.9.
|
|
46
|
+
"mailgun.js": "^12.7.0",
|
|
47
|
+
"mailparser": "^3.9.3",
|
|
48
48
|
"mime": "^4.1.0",
|
|
49
|
-
"mysql2": "^3.16.
|
|
49
|
+
"mysql2": "^3.16.2",
|
|
50
50
|
"node-mailjet": "^6.0.11",
|
|
51
51
|
"node-polyfill-webpack-plugin": "^4.1.0",
|
|
52
52
|
"office-text-extractor": "^4.0.0",
|
|
53
|
-
"openai": "^6.
|
|
53
|
+
"openai": "^6.17.0",
|
|
54
54
|
"pdf-lib": "^1.17.1",
|
|
55
|
-
"pdfjs-dist": "^5.4.
|
|
56
|
-
"pg": "^8.
|
|
55
|
+
"pdfjs-dist": "^5.4.624",
|
|
56
|
+
"pg": "^8.18.0",
|
|
57
57
|
"pgvector": "^0.2.1",
|
|
58
58
|
"ping": "^1.0.0",
|
|
59
59
|
"process": "^0.11.10",
|
|
60
|
-
"puppeteer": "^24.
|
|
60
|
+
"puppeteer": "^24.36.1",
|
|
61
61
|
"say": "^0.16.0",
|
|
62
62
|
"telegraf": "^4.16.3",
|
|
63
63
|
"telesignsdk": "^3.0.4",
|
|
64
64
|
"tesseract.js": "^7.0.0",
|
|
65
|
-
"twilio": "^5.
|
|
65
|
+
"twilio": "^5.12.0",
|
|
66
66
|
"url": "github:Leask/node-url",
|
|
67
67
|
"webpack-cli": "^6.0.1",
|
|
68
68
|
"whisper-node": "^1.1.1",
|
|
69
|
-
"wrangler": "^4.
|
|
69
|
+
"wrangler": "^4.61.1",
|
|
70
70
|
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.1/xlsx-0.20.1.tgz",
|
|
71
71
|
"youtube-transcript": "^1.2.1"
|
|
72
72
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "utilitas",
|
|
3
3
|
"description": "Just another common utility for JavaScript.",
|
|
4
|
-
"version": "2001.1.
|
|
4
|
+
"version": "2001.1.119",
|
|
5
5
|
"private": false,
|
|
6
6
|
"homepage": "https://github.com/Leask/utilitas",
|
|
7
7
|
"main": "index.mjs",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.1/xlsx-0.20.1.tgz"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"file-type": "^21.
|
|
33
|
+
"file-type": "^21.3.0",
|
|
34
34
|
"mathjs": "^15.1.0",
|
|
35
35
|
"uuid": "^13.0.0"
|
|
36
36
|
},
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"@ffprobe-installer/ffprobe": "^2.1.2",
|
|
40
40
|
"@google-cloud/discoveryengine": "^2.5.2",
|
|
41
41
|
"@google-cloud/storage": "^7.18.0",
|
|
42
|
-
"@google/genai": "^1.
|
|
42
|
+
"@google/genai": "^1.39.0",
|
|
43
43
|
"@mozilla/readability": "github:mozilla/readability",
|
|
44
|
-
"@sentry/node": "^10.
|
|
45
|
-
"@sentry/profiling-node": "^10.
|
|
44
|
+
"@sentry/node": "^10.38.0",
|
|
45
|
+
"@sentry/profiling-node": "^10.38.0",
|
|
46
46
|
"acme-client": "^5.4.0",
|
|
47
47
|
"browserify-fs": "^1.0.0",
|
|
48
48
|
"buffer": "^6.0.3",
|
|
@@ -51,33 +51,33 @@
|
|
|
51
51
|
"fluent-ffmpeg": "^2.1.3",
|
|
52
52
|
"form-data": "^4.0.5",
|
|
53
53
|
"google-gax": "^5.0.6",
|
|
54
|
-
"ioredis": "^5.
|
|
55
|
-
"jsdom": "^
|
|
54
|
+
"ioredis": "^5.9.2",
|
|
55
|
+
"jsdom": "^28.0.0",
|
|
56
56
|
"lorem-ipsum": "^2.0.8",
|
|
57
|
-
"mailgun.js": "^12.
|
|
58
|
-
"mailparser": "^3.9.
|
|
57
|
+
"mailgun.js": "^12.7.0",
|
|
58
|
+
"mailparser": "^3.9.3",
|
|
59
59
|
"mime": "^4.1.0",
|
|
60
|
-
"mysql2": "^3.16.
|
|
60
|
+
"mysql2": "^3.16.2",
|
|
61
61
|
"node-mailjet": "^6.0.11",
|
|
62
62
|
"node-polyfill-webpack-plugin": "^4.1.0",
|
|
63
63
|
"office-text-extractor": "^4.0.0",
|
|
64
|
-
"openai": "^6.
|
|
64
|
+
"openai": "^6.17.0",
|
|
65
65
|
"pdf-lib": "^1.17.1",
|
|
66
|
-
"pdfjs-dist": "^5.4.
|
|
67
|
-
"pg": "^8.
|
|
66
|
+
"pdfjs-dist": "^5.4.624",
|
|
67
|
+
"pg": "^8.18.0",
|
|
68
68
|
"pgvector": "^0.2.1",
|
|
69
69
|
"ping": "^1.0.0",
|
|
70
70
|
"process": "^0.11.10",
|
|
71
|
-
"puppeteer": "^24.
|
|
71
|
+
"puppeteer": "^24.36.1",
|
|
72
72
|
"say": "^0.16.0",
|
|
73
73
|
"telegraf": "^4.16.3",
|
|
74
74
|
"telesignsdk": "^3.0.4",
|
|
75
75
|
"tesseract.js": "^7.0.0",
|
|
76
|
-
"twilio": "^5.
|
|
76
|
+
"twilio": "^5.12.0",
|
|
77
77
|
"url": "github:Leask/node-url",
|
|
78
78
|
"webpack-cli": "^6.0.1",
|
|
79
79
|
"whisper-node": "^1.1.1",
|
|
80
|
-
"wrangler": "^4.
|
|
80
|
+
"wrangler": "^4.61.1",
|
|
81
81
|
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.1/xlsx-0.20.1.tgz",
|
|
82
82
|
"youtube-transcript": "^1.2.1"
|
|
83
83
|
}
|