utilitas 1999.1.69 → 1999.1.70
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/README.md +1 -1
- package/dist/utilitas.lite.mjs +1 -1
- package/dist/utilitas.lite.mjs.map +1 -1
- package/lib/alan.mjs +13 -4
- package/lib/manifest.mjs +17 -17
- package/package.json +17 -17
package/lib/alan.mjs
CHANGED
|
@@ -62,7 +62,7 @@ const [
|
|
|
62
62
|
JINA_CLIP, VERTEX, GEMINI_25_PRO, SILICONFLOW, SF_DEEPSEEK_V3,
|
|
63
63
|
] = [
|
|
64
64
|
'OpenAI', 'Gemini', 'OPENAI_TRAINING', 'Ollama', 'gpt-4o', 'o3',
|
|
65
|
-
'gemini-2.5-flash-preview-
|
|
65
|
+
'gemini-2.5-flash-preview-05-20', 'nova', 'deepseek-r1', '```',
|
|
66
66
|
'text-embedding-3-small', 'text-embedding-3-large',
|
|
67
67
|
'claude-3-7-sonnet@20250219', 'audio', 'wav', '[ATTACHMENTS]', 'CHAT',
|
|
68
68
|
'OPENAI_VOICE', 'medium', 'low', 'high', 'medium', 'think', '<think>',
|
|
@@ -465,7 +465,7 @@ const init = async (options = {}) => {
|
|
|
465
465
|
process.env['ANTHROPIC_VERTEX_PROJECT_ID'] = options.projectId;
|
|
466
466
|
var model = models[0];
|
|
467
467
|
var client = new ((
|
|
468
|
-
await need('@anthropic-ai/vertex-sdk')
|
|
468
|
+
await need('@anthropic-ai/vertex-sdk', { raw: true })
|
|
469
469
|
).AnthropicVertex)({ region: options?.region || 'us-east5' });
|
|
470
470
|
setupAi({ provider, model, client, prompt: promptAnthropic });
|
|
471
471
|
break;
|
|
@@ -1205,12 +1205,17 @@ const promptGemini = async (aiId, content, options = {}) => {
|
|
|
1205
1205
|
systemInstruction, responseModalities: options.modalities || (
|
|
1206
1206
|
options.imageMode ? [TEXT, IMAGE] : undefined
|
|
1207
1207
|
), ...options?.config || {}, ...model?.tools && !options.jsonMode
|
|
1208
|
-
|
|
1208
|
+
// @todo: Gemini 2.5 flash 05-20 refusing to use certain tool calls
|
|
1209
|
+
// https://discuss.ai.google.dev/t/gemini-2-5-flash-05-20-refusing-to-use-certain-tool-calls/84086
|
|
1210
|
+
&& ![GEMINI_20_FLASH, GEMINI_25_FLASH].includes(options.model)
|
|
1211
|
+
? (options.tools ?? {
|
|
1209
1212
|
tools: [
|
|
1210
1213
|
// @todo: Gemini will failed when using these tools together.
|
|
1211
1214
|
// https://ai.google.dev/gemini-api/docs/function-calling
|
|
1212
1215
|
// { codeExecution: {} },
|
|
1213
1216
|
// { googleSearch: {} },
|
|
1217
|
+
// { urlContext: {} },
|
|
1218
|
+
// @todo: test these tools in next version 👆
|
|
1214
1219
|
{
|
|
1215
1220
|
functionDeclarations: (
|
|
1216
1221
|
await toolsGemini({ provider })
|
|
@@ -1222,7 +1227,11 @@ const promptGemini = async (aiId, content, options = {}) => {
|
|
|
1222
1227
|
});
|
|
1223
1228
|
const resp = await chat.sendMessageStream({ message: prompt });
|
|
1224
1229
|
for await (const chunk of resp) {
|
|
1225
|
-
|
|
1230
|
+
assert(
|
|
1231
|
+
!chunk?.promptFeedback?.blockReason,
|
|
1232
|
+
chunk?.promptFeedback?.blockReason
|
|
1233
|
+
);
|
|
1234
|
+
event = chunk?.candidates?.[0];
|
|
1226
1235
|
let [deltaText, deltaImages] = ['', []];
|
|
1227
1236
|
event?.content?.parts?.map(x => {
|
|
1228
1237
|
if (x.text) { deltaText = x.text; }
|
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": "1999.1.
|
|
4
|
+
"version": "1999.1.70",
|
|
5
5
|
"private": false,
|
|
6
6
|
"homepage": "https://github.com/Leask/utilitas",
|
|
7
7
|
"main": "index.mjs",
|
|
@@ -20,22 +20,22 @@ const manifest = {
|
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"file-type": "^20.5.0",
|
|
23
|
-
"mathjs": "^14.
|
|
23
|
+
"mathjs": "^14.5.0",
|
|
24
24
|
"uuid": "^11.1.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@anthropic-ai/sdk": "^0.
|
|
28
|
-
"@anthropic-ai/vertex-sdk": "^0.
|
|
27
|
+
"@anthropic-ai/sdk": "^0.51.0",
|
|
28
|
+
"@anthropic-ai/vertex-sdk": "^0.11.3",
|
|
29
29
|
"@ffmpeg-installer/ffmpeg": "^1.1.0",
|
|
30
30
|
"@ffprobe-installer/ffprobe": "^2.1.2",
|
|
31
|
-
"@google-cloud/speech": "^7.0
|
|
31
|
+
"@google-cloud/speech": "^7.1.0",
|
|
32
32
|
"@google-cloud/storage": "^7.16.0",
|
|
33
|
-
"@google-cloud/text-to-speech": "^6.0
|
|
33
|
+
"@google-cloud/text-to-speech": "^6.1.0",
|
|
34
34
|
"@google-cloud/vision": "^5.1.0",
|
|
35
|
-
"@google/genai": "^0.
|
|
35
|
+
"@google/genai": "^1.0.0",
|
|
36
36
|
"@mozilla/readability": "github:mozilla/readability",
|
|
37
|
-
"@sentry/node": "^9.
|
|
38
|
-
"@sentry/profiling-node": "^9.
|
|
37
|
+
"@sentry/node": "^9.22.0",
|
|
38
|
+
"@sentry/profiling-node": "^9.22.0",
|
|
39
39
|
"acme-client": "^5.4.0",
|
|
40
40
|
"browserify-fs": "^1.0.0",
|
|
41
41
|
"buffer": "^6.0.3",
|
|
@@ -47,28 +47,28 @@ const manifest = {
|
|
|
47
47
|
"jsdom": "^26.1.0",
|
|
48
48
|
"lorem-ipsum": "^2.0.8",
|
|
49
49
|
"mailgun.js": "^12.0.1",
|
|
50
|
-
"mailparser": "^3.7.
|
|
50
|
+
"mailparser": "^3.7.3",
|
|
51
51
|
"mime": "^4.0.7",
|
|
52
52
|
"mysql2": "^3.14.1",
|
|
53
53
|
"node-mailjet": "^6.0.8",
|
|
54
54
|
"node-polyfill-webpack-plugin": "^4.1.0",
|
|
55
55
|
"office-text-extractor": "^3.0.3",
|
|
56
|
-
"openai": "^4.
|
|
56
|
+
"openai": "^4.100.0",
|
|
57
57
|
"pdfjs-dist": "^5.2.133",
|
|
58
|
-
"pg": "^8.
|
|
59
|
-
"pgvector": "^0.2.
|
|
58
|
+
"pg": "^8.16.0",
|
|
59
|
+
"pgvector": "^0.2.1",
|
|
60
60
|
"ping": "^0.4.4",
|
|
61
61
|
"process": "^0.11.10",
|
|
62
|
-
"puppeteer": "^24.
|
|
62
|
+
"puppeteer": "^24.9.0",
|
|
63
63
|
"say": "^0.16.0",
|
|
64
64
|
"telegraf": "^4.16.3",
|
|
65
|
-
"telesignsdk": "^3.0.
|
|
65
|
+
"telesignsdk": "^3.0.3",
|
|
66
66
|
"tesseract.js": "^6.0.1",
|
|
67
|
-
"twilio": "^5.
|
|
67
|
+
"twilio": "^5.6.1",
|
|
68
68
|
"url": "github:Leask/node-url",
|
|
69
69
|
"webpack-cli": "^6.0.1",
|
|
70
70
|
"whisper-node": "^1.1.1",
|
|
71
|
-
"wrangler": "^4.
|
|
71
|
+
"wrangler": "^4.16.0",
|
|
72
72
|
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.1/xlsx-0.20.1.tgz",
|
|
73
73
|
"youtube-transcript": "^1.2.1"
|
|
74
74
|
}
|
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": "1999.1.
|
|
4
|
+
"version": "1999.1.70",
|
|
5
5
|
"private": false,
|
|
6
6
|
"homepage": "https://github.com/Leask/utilitas",
|
|
7
7
|
"main": "index.mjs",
|
|
@@ -31,22 +31,22 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"file-type": "^20.5.0",
|
|
34
|
-
"mathjs": "^14.
|
|
34
|
+
"mathjs": "^14.5.0",
|
|
35
35
|
"uuid": "^11.1.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@anthropic-ai/sdk": "^0.
|
|
39
|
-
"@anthropic-ai/vertex-sdk": "^0.
|
|
38
|
+
"@anthropic-ai/sdk": "^0.51.0",
|
|
39
|
+
"@anthropic-ai/vertex-sdk": "^0.11.3",
|
|
40
40
|
"@ffmpeg-installer/ffmpeg": "^1.1.0",
|
|
41
41
|
"@ffprobe-installer/ffprobe": "^2.1.2",
|
|
42
|
-
"@google-cloud/speech": "^7.0
|
|
42
|
+
"@google-cloud/speech": "^7.1.0",
|
|
43
43
|
"@google-cloud/storage": "^7.16.0",
|
|
44
|
-
"@google-cloud/text-to-speech": "^6.0
|
|
44
|
+
"@google-cloud/text-to-speech": "^6.1.0",
|
|
45
45
|
"@google-cloud/vision": "^5.1.0",
|
|
46
|
-
"@google/genai": "^0.
|
|
46
|
+
"@google/genai": "^1.0.0",
|
|
47
47
|
"@mozilla/readability": "github:mozilla/readability",
|
|
48
|
-
"@sentry/node": "^9.
|
|
49
|
-
"@sentry/profiling-node": "^9.
|
|
48
|
+
"@sentry/node": "^9.22.0",
|
|
49
|
+
"@sentry/profiling-node": "^9.22.0",
|
|
50
50
|
"acme-client": "^5.4.0",
|
|
51
51
|
"browserify-fs": "^1.0.0",
|
|
52
52
|
"buffer": "^6.0.3",
|
|
@@ -58,28 +58,28 @@
|
|
|
58
58
|
"jsdom": "^26.1.0",
|
|
59
59
|
"lorem-ipsum": "^2.0.8",
|
|
60
60
|
"mailgun.js": "^12.0.1",
|
|
61
|
-
"mailparser": "^3.7.
|
|
61
|
+
"mailparser": "^3.7.3",
|
|
62
62
|
"mime": "^4.0.7",
|
|
63
63
|
"mysql2": "^3.14.1",
|
|
64
64
|
"node-mailjet": "^6.0.8",
|
|
65
65
|
"node-polyfill-webpack-plugin": "^4.1.0",
|
|
66
66
|
"office-text-extractor": "^3.0.3",
|
|
67
|
-
"openai": "^4.
|
|
67
|
+
"openai": "^4.100.0",
|
|
68
68
|
"pdfjs-dist": "^5.2.133",
|
|
69
|
-
"pg": "^8.
|
|
70
|
-
"pgvector": "^0.2.
|
|
69
|
+
"pg": "^8.16.0",
|
|
70
|
+
"pgvector": "^0.2.1",
|
|
71
71
|
"ping": "^0.4.4",
|
|
72
72
|
"process": "^0.11.10",
|
|
73
|
-
"puppeteer": "^24.
|
|
73
|
+
"puppeteer": "^24.9.0",
|
|
74
74
|
"say": "^0.16.0",
|
|
75
75
|
"telegraf": "^4.16.3",
|
|
76
|
-
"telesignsdk": "^3.0.
|
|
76
|
+
"telesignsdk": "^3.0.3",
|
|
77
77
|
"tesseract.js": "^6.0.1",
|
|
78
|
-
"twilio": "^5.
|
|
78
|
+
"twilio": "^5.6.1",
|
|
79
79
|
"url": "github:Leask/node-url",
|
|
80
80
|
"webpack-cli": "^6.0.1",
|
|
81
81
|
"whisper-node": "^1.1.1",
|
|
82
|
-
"wrangler": "^4.
|
|
82
|
+
"wrangler": "^4.16.0",
|
|
83
83
|
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.1/xlsx-0.20.1.tgz",
|
|
84
84
|
"youtube-transcript": "^1.2.1"
|
|
85
85
|
}
|