halbot 1992.1.16 → 1992.1.18

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.
Files changed (2) hide show
  1. package/README.md +28 -38
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -27,7 +27,8 @@ alt="Halbot live demo" width="240" height="180" border="10" /></a>
27
27
 
28
28
  - [Telegram](https://telegram.org/) Bot (`Telegram Bot` token required)
29
29
  - [ChatGPT](https://openai.com/blog/chatgpt) (`OpenAI` API key required)
30
- - [Gemini](https://cloud.google.com/vertex-ai/docs/generative-ai/multimodal/overview?hl=en) (`Google Vertex AI` credentials required)
30
+ - [Gemini](https://ai.google.dev/gemini-api/docs) (Google `Gemini` API Key required)
31
+ - [Claude](https://www.anthropic.com/api) (`Anthropic` API Key required)
31
32
  - [Mistral](https://mistral.ai/) (Install [Ollama](https://github.com/jmorganca/ollama) and enable `Mistral`)
32
33
  - Speech-to-Text (`OpenAI` or `Google Cloud` API key required, or your own engine)
33
34
  - Text-to-Speech (`OpenAI` or `Google Cloud` API key required, or your own engine)
@@ -39,9 +40,13 @@ alt="Halbot live demo" width="240" height="180" border="10" /></a>
39
40
  - `Middleware` style workflow, easy to extend.
40
41
  - Built-in support parsing webpages, `YouTube` videos, PDFs, images, Office documents, code files, text files...
41
42
  - Realtime stream-style response, no more waiting.
42
- - Markdown rendering for GhatGPT
43
- - Reference rendering for Bing Chat
43
+ - Multimodal support for all supported models.
44
+ - Audio input and output support for supported models, not just TTS.
45
+ - Google `Search as a tool` support for [Gemini 2.0](https://ai.google.dev/gemini-api/docs/models/gemini-v2).
46
+ - Markdown rendering
47
+ - Reference rendering
44
48
  - Code block rendering, developers friendly.
49
+ - Threaded conversation support.
45
50
  - ESM from the ground up
46
51
 
47
52
  ## Basic usage
@@ -67,14 +72,22 @@ All supported configuration fields:
67
72
  // REQUIRED, string.
68
73
  "telegramToken": "[[Telegram Bot API Token]]",
69
74
 
70
- // Set some of these fields if you need ChatGPT, Whisper, Embedding features.
75
+ // Set some of these fields if you need Google's Gemini, TTS, STT, OCR, OBJECT_DETECT, Embedding features.
76
+ // OPTIONAL, string.
77
+ "googleApiKey": "[[Google Cloud / Gemini API Key]]",
78
+ // OPTIONAL, string, default: "gemini-pro-vision".
79
+ "geminiModel": "[[Custom Gemini Model ID]]",
80
+ // OPTIONAL, integer, default: 0.
81
+ "geminiPriority": "[[Custom Gemini Priority]]",
82
+
83
+ // Set some of these fields if you need OpenAI's ChatGPT, Whisper, Embedding features.
71
84
  // OPTIONAL, string.
72
85
  "openaiApiKey": "[[OpenAI API Key]]",
73
86
  // OPTIONAL, string.
74
87
  "openaiEndpoint": "[[Custom OpenAI API endpoint]]",
75
88
  // OPTIONAL, string, default: "gpt-3.5-turbo".
76
89
  "chatGptModel": "[[Custom ChatGPT Model ID]]",
77
- // OPTIONAL, integer, default: 0.
90
+ // OPTIONAL, integer, default: 1.
78
91
  "chatGptPriority": "[[Custom ChatGPT Priority]]",
79
92
 
80
93
  // Set some of these fields if you need to use custom ChatGPT API.
@@ -83,37 +96,31 @@ All supported configuration fields:
83
96
  // OPTIONAL, string.
84
97
  "chatGptEndpoint": "[[Custom ChatGPT API endpoint]]",
85
98
 
86
- // Set this field if you need Gemini features.
87
- // OPTIONAL, string.
88
- "googleCredentials": "[[Google Cloud Credentials]]",
99
+ // Set some of these fields if you need Anthropic's Claude features.
89
100
  // OPTIONAL, string.
90
- "googleProject": "[[Google Cloud Project ID]]",
91
- // OPTIONAL, string, default: "gemini-pro-vision".
92
- "geminiModel": "[[Custom Gemini Model ID]]",
93
- // OPTIONAL, integer, default: 1.
94
- "geminiPriority": "[[Custom Gemini Priority]]",
101
+ "claudeApiKey": "[[Anthropic API Key]]",
102
+ // OPTIONAL, string, default: "claude".
103
+ "claudeModel": "[[Custom Claude Model ID]]",
104
+ // OPTIONAL, integer, default: 2.
105
+ "claudePriority": "[[Custom Claude Priority]]",
95
106
 
96
- // Set this field if you need Mistral features.
107
+ // Set some of these fields if you need Mistral features.
97
108
  // OPTIONAL, boolean.
98
109
  "mistralEnabled": "[[Enable Mistral hosted by Ollama]]",
99
110
  // OPTIONAL, string.
100
111
  "mistralEndpoint": "[[Custom Mistral API endpoint]]",
101
112
  // OPTIONAL, string, default: "Mistral" (Mistral 7B).
102
113
  "mistralModel": "[[Custom Mistral Model ID]]",
103
- // OPTIONAL, integer, default: 2.
114
+ // OPTIONAL, integer, default: 3.
104
115
  "mistralPriority": "[[Custom Mistral Priority]]",
105
116
 
106
- // OPTIONAL, string.
107
- // Set this field if you need Google's TTS/STT/OCR/OBJECT_DETECT/Embedding.
108
- "googleApiKey": "[[Google Cloud API Key]]",
109
-
110
117
  // OPTIONAL, undefined || array of string.
111
118
  // To open the bot to PUBLIC, DO NOT set this field;
112
119
  // To restrict the bot to PRIVATE, set chat/group/channel ids in this array.
113
120
  "private": ["[[CHAT_ID]]", "[[GROUP_ID]]", "[[CHANNEL_ID]]", ...],
114
121
 
115
122
  // OPTIONAL, string.
116
- // Set this field if you want to use a `magic word` to authenticate the bot.
123
+ // Set some of these fields if you want to use a `magic word` to authenticate the bot.
117
124
  "magicWord": "[[Your Magic Word here]]",
118
125
 
119
126
  // OPTIONAL, string.
@@ -142,6 +149,7 @@ All supported configuration fields:
142
149
  // support PostgreSQL, MariaDB/MySQL and Redis for now.
143
150
  // If omitted, the bot will use memory storage and sync to this file.
144
151
  // Example: (Compatibility: https://node-postgres.com/apis/pool)
152
+ // PostgreSQL is recommended for vector storage.
145
153
  "storage": {
146
154
  "provider": "POSTGRESQL",
147
155
  "host": "[[DATABASE HOST]]",
@@ -308,24 +316,6 @@ const config = {
308
316
  await halbot(config);
309
317
  ```
310
318
 
311
- ## ❤️ Become a sponsor to `halbot`
312
-
313
- [For `$10/month`, you can access the official `halbot` service for a month](https://github.com/sponsors/Leask).
314
-
315
- You don't need to pay `$20/month` for ChatGPT tokens separately.
316
-
317
- `halbot` is stable. It's running on top of the latest `GPT-4` model. It has a better user experience than the official web app. You can access `halbot` from your favourite Telegram apps on your phone, tablet and computer.
318
-
319
- Additionally, `halbot` has a lot of built-in input parsers to maximize the ChatGPT engine's power.
320
-
321
- `halbot` can now parse webpages, YouTube videos, PDFs, images, Office documents, code files, and text files. And other parsers are coming soon.
322
-
323
- `halbot` integrates Text-to-Image service by DALL·E 3. You can ask it to draw what you want.
324
-
325
- `halbot` also supports Text-to-Speech and Speech-to-Text. You can `talk` to the AI engines to get help with your job.
326
-
327
- And remember, you can always use the codes in this repo to build your own `halbot` instant. This project will keep open source forever.
328
-
329
319
  ## Foundations
330
320
 
331
321
  - `halbot` uses my other project [🧰 utilitas](https://github.com/Leask/utilitas) as the basic framework to handle all the dirty work.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "halbot",
3
3
  "description": "Just another `ChatGPT` / `Gemini` / `Mistral (by ollama)` Telegram bob, which is simple design, easy to use, extendable and fun.",
4
- "version": "1992.1.16",
4
+ "version": "1992.1.18",
5
5
  "private": false,
6
6
  "homepage": "https://github.com/Leask/halbot",
7
7
  "type": "module",