halbot 1989.6.9 → 1989.6.11
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 +30 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,17 +5,19 @@
|
|
|
5
5
|
|
|
6
6
|
Just another `ChatGPT`/`Bing Chat` Telegram bob, which is simple design, easy to use, extendable and fun.
|
|
7
7
|
|
|
8
|
-
Features
|
|
8
|
+
## Features
|
|
9
9
|
|
|
10
|
-
- Telegram Bot (`Telegram Bot` token required)
|
|
11
|
-
- ChatGPT (`OpenAI` API key required)
|
|
12
|
-
- Bing Chat (`Bing Chat` user token required)
|
|
13
|
-
- Speech-to-text (`Google Cloud` API key required)
|
|
14
|
-
- Text-to-speech (`Google Cloud` API key required)
|
|
10
|
+
- Telegram Bot (`Telegram Bot` token required);
|
|
11
|
+
- ChatGPT (`OpenAI` API key required);
|
|
12
|
+
- Bing Chat (`Bing Chat` user token required);
|
|
13
|
+
- Speech-to-text (`Google Cloud` API key required, or your own engine);
|
|
14
|
+
- Text-to-speech (`Google Cloud` API key required, or your own engine);
|
|
15
|
+
- Support `private` and `public` mode, with multiple authenticate methods;
|
|
16
|
+
- `Middleware` style workflow, easy to extend;
|
|
15
17
|
|
|
16
18
|
## How to use
|
|
17
19
|
|
|
18
|
-
###
|
|
20
|
+
### Configuration
|
|
19
21
|
|
|
20
22
|
Make the `halbot` json config file and put it in this path `~/.halbot.json`.
|
|
21
23
|
|
|
@@ -99,11 +101,31 @@ const config = {
|
|
|
99
101
|
[[aiNameB]]: [[aiClientB]],
|
|
100
102
|
},
|
|
101
103
|
|
|
102
|
-
// OPTIONAL,
|
|
104
|
+
// OPTIONAL, object.
|
|
105
|
+
// Your own speech-to-text and text-to-speech engine.
|
|
103
106
|
speech: {
|
|
104
107
|
stt: [[sttClient]],
|
|
105
108
|
tts: [[ttsClient]]]],
|
|
106
109
|
},
|
|
110
|
+
|
|
111
|
+
// OPTIONAL, string.
|
|
112
|
+
// Path to your own middlewares.
|
|
113
|
+
// ./skills
|
|
114
|
+
// |- skill_a.mjs
|
|
115
|
+
// | const action = async (bot) => {
|
|
116
|
+
// | bot.use(async (ctx, next) => {
|
|
117
|
+
// | ctx.reply('42');
|
|
118
|
+
// | await next();
|
|
119
|
+
// | });
|
|
120
|
+
// | };
|
|
121
|
+
// |
|
|
122
|
+
// | export const { run, priority, func } = {
|
|
123
|
+
// | run: true,
|
|
124
|
+
// | priority: 100,
|
|
125
|
+
// | func: action,
|
|
126
|
+
// | };
|
|
127
|
+
skillPath: './skills',
|
|
128
|
+
|
|
107
129
|
};
|
|
108
130
|
|
|
109
131
|
await halbot(config);
|