halbot 1991.1.17 → 1991.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.
package/index.mjs CHANGED
@@ -38,11 +38,11 @@ const init = async (options) => {
38
38
  // init ai engines
39
39
  if (options?.openaiApiKey || options?.chatGptApiKey) {
40
40
  const apiKey = { apiKey: options?.openaiApiKey || options?.chatGptApiKey };
41
- await alan.init({ ...apiKey, ...options, provider: 'openai' });
41
+ await alan.init({ ...apiKey, ...options, provider: 'OPENAI' });
42
42
  ai['ChatGPT'] = {
43
- engine: 'CHATGPT', priority: options?.chatGptPriority || 0,
43
+ engine: 'ASSISTANT', priority: options?.chatGptPriority || 0, // CHATGPT
44
44
  };
45
- engines['CHATGPT'] = {
45
+ engines['ASSISTANT'] = { // CHATGPT
46
46
  // only support custom model while prompting
47
47
  model: options?.chatGptModel,
48
48
  };
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": "1991.1.17",
4
+ "version": "1991.1.18",
5
5
  "private": false,
6
6
  "homepage": "https://github.com/Leask/halbot",
7
7
  "type": "module",
@@ -21,7 +21,6 @@ const action = async (ctx, next) => {
21
21
  ).map(x => x.content);
22
22
  const maxInputTokens = alan.getMaxChatPromptLimit()
23
23
  - alan.ATTACHMENT_TOKEN_COST * ctx.carry.attachments.length;
24
- print(maxInputTokens);
25
24
  const additionInfo = ctx.collected.filter(
26
25
  x => String.isString(x.content)
27
26
  ).map(x => x.content).join('\n').split(' ').filter(x => x);