halbot 1993.2.48 → 1993.2.49
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/index.mjs +3 -0
- package/package.json +11 -11
- package/skills/-8845_thread.mjs +2 -2
- package/skills/10_engine.mjs +0 -8
- package/skills/70_chat.mjs +1 -2
package/index.mjs
CHANGED
|
@@ -74,6 +74,9 @@ const init = async (options) => {
|
|
|
74
74
|
});
|
|
75
75
|
_speech.tts = speech.tts;
|
|
76
76
|
}
|
|
77
|
+
options?.googleCx && await shot.initSearch({
|
|
78
|
+
apiKey: options.googleApiKey, cx: options.googleCx
|
|
79
|
+
});
|
|
77
80
|
}
|
|
78
81
|
if (options?.claudeApiKey || (options?.claudeCredentials && options?.claudeProjectId)) {
|
|
79
82
|
await alan.init({
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "halbot",
|
|
3
3
|
"description": "Just another `ChatGPT` / `Gemini` / `Ollama` Telegram bob, which is simple design, easy to use, extendable and fun.",
|
|
4
|
-
"version": "1993.2.
|
|
4
|
+
"version": "1993.2.49",
|
|
5
5
|
"private": false,
|
|
6
6
|
"homepage": "https://github.com/Leask/halbot",
|
|
7
7
|
"type": "module",
|
|
@@ -29,31 +29,31 @@
|
|
|
29
29
|
"url": "https://github.com/Leask/halbot.git"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@anthropic-ai/sdk": "^0.
|
|
32
|
+
"@anthropic-ai/sdk": "^0.39.0",
|
|
33
33
|
"@anthropic-ai/vertex-sdk": "^0.7.0",
|
|
34
34
|
"@ffmpeg-installer/ffmpeg": "^1.1.0",
|
|
35
35
|
"@ffprobe-installer/ffprobe": "^2.1.2",
|
|
36
|
-
"@google-cloud/speech": "^6.7.
|
|
37
|
-
"@google-cloud/text-to-speech": "^5.8.
|
|
38
|
-
"@google-cloud/vision": "^4.3.
|
|
39
|
-
"@google/generative-ai": "^0.
|
|
40
|
-
"@mozilla/readability": "^0.
|
|
36
|
+
"@google-cloud/speech": "^6.7.1",
|
|
37
|
+
"@google-cloud/text-to-speech": "^5.8.1",
|
|
38
|
+
"@google-cloud/vision": "^4.3.3",
|
|
39
|
+
"@google/generative-ai": "^0.24.0",
|
|
40
|
+
"@mozilla/readability": "^0.6.0",
|
|
41
41
|
"csv-parse": "^5.6.0",
|
|
42
42
|
"fluent-ffmpeg": "^2.1.3",
|
|
43
|
-
"ioredis": "^5.
|
|
43
|
+
"ioredis": "^5.6.0",
|
|
44
44
|
"js-tiktoken": "^1.0.19",
|
|
45
45
|
"jsdom": "^26.0.0",
|
|
46
46
|
"lorem-ipsum": "^2.0.8",
|
|
47
47
|
"mime": "^4.0.6",
|
|
48
|
-
"mysql2": "^3.
|
|
48
|
+
"mysql2": "^3.13.0",
|
|
49
49
|
"office-text-extractor": "^3.0.3",
|
|
50
50
|
"ollama": "^0.5.14",
|
|
51
|
-
"openai": "^4.
|
|
51
|
+
"openai": "^4.86.2",
|
|
52
52
|
"pg": "^8.13.3",
|
|
53
53
|
"pgvector": "^0.2.0",
|
|
54
54
|
"telegraf": "^4.16.3",
|
|
55
55
|
"tesseract.js": "^6.0.0",
|
|
56
|
-
"utilitas": "^1998.2.
|
|
56
|
+
"utilitas": "^1998.2.49",
|
|
57
57
|
"youtube-transcript": "^1.2.1"
|
|
58
58
|
}
|
|
59
59
|
}
|
package/skills/-8845_thread.mjs
CHANGED
|
@@ -39,7 +39,7 @@ const action = async (ctx, next) => {
|
|
|
39
39
|
ctx.clear = async context => {
|
|
40
40
|
await alan.resetSession(
|
|
41
41
|
ctx.session.sessionId,
|
|
42
|
-
|
|
42
|
+
{ systemPrompt: context?.prompt } // @todo: switch to real system prompt
|
|
43
43
|
);
|
|
44
44
|
resetContext(context);
|
|
45
45
|
const id = findSession(ctx.session.sessionId);
|
|
@@ -47,7 +47,7 @@ const action = async (ctx, next) => {
|
|
|
47
47
|
ctx.session.sessions?.[id] && (
|
|
48
48
|
ctx.session.sessions[id].context = ctx.session.context
|
|
49
49
|
);
|
|
50
|
-
ctx.hello(
|
|
50
|
+
ctx.hello();
|
|
51
51
|
};
|
|
52
52
|
const switchSession = async () => {
|
|
53
53
|
let resp;
|
package/skills/10_engine.mjs
CHANGED
|
@@ -80,9 +80,6 @@ export const { name, run, priority, func, help, args } = {
|
|
|
80
80
|
'¶ Select between AI engines.',
|
|
81
81
|
"Tip 2: Set `ai=''` to use default AI engine.",
|
|
82
82
|
'Tip 3: Set `ai=@` to use all AI engines simultaneously.',
|
|
83
|
-
'¶ Tweak enhanced output rendering.',
|
|
84
|
-
'Example 1: /set --render on',
|
|
85
|
-
'Example 2: /set --render off',
|
|
86
83
|
]),
|
|
87
84
|
args: {
|
|
88
85
|
hello: {
|
|
@@ -94,10 +91,5 @@ export const { name, run, priority, func, help, args } = {
|
|
|
94
91
|
desc: "`(ChatGPT, Gemini, Claude, Azure, Ollama, @)` Select AI engine.",
|
|
95
92
|
validate: validateAi,
|
|
96
93
|
},
|
|
97
|
-
render: {
|
|
98
|
-
type: 'string', short: 'r', default: bot.BINARY_STRINGS[0],
|
|
99
|
-
desc: `\`(${bot.BINARY_STRINGS.join(', ')})\` Enable/Disable enhanced output rendering.`,
|
|
100
|
-
validate: utilitas.humanReadableBoolean,
|
|
101
|
-
},
|
|
102
94
|
},
|
|
103
95
|
};
|
package/skills/70_chat.mjs
CHANGED
|
@@ -64,8 +64,7 @@ const action = async (ctx, next) => {
|
|
|
64
64
|
});
|
|
65
65
|
references = resp.references;
|
|
66
66
|
audio = resp.audio;
|
|
67
|
-
msgs[ai] =
|
|
68
|
-
? resp.text : resp.richText;
|
|
67
|
+
msgs[ai] = resp.text;
|
|
69
68
|
tts[ai] = ctx.selectedAi.length === 1
|
|
70
69
|
&& !msgs[ai].split('\n').some(x => /^\s*```/.test(x))
|
|
71
70
|
? resp.spoken : '';
|