@codebam/cf-workers-telegram-bot 12.6.6 → 12.6.7

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.
@@ -9,7 +9,7 @@ export declare class HistoryManager {
9
9
  * @param threadId - optional thread ID
10
10
  * @returns array of messages
11
11
  */
12
- getHistory(userId: number, threadId?: number): Promise<{
12
+ getHistory(userId: number | string, threadId?: number): Promise<{
13
13
  role: string;
14
14
  content: string;
15
15
  }[]>;
@@ -20,13 +20,13 @@ export declare class HistoryManager {
20
20
  * @param response - the bot response
21
21
  * @param threadId - optional thread ID
22
22
  */
23
- addMessage(userId: number, prompt: string, response: string, threadId?: number): Promise<void>;
23
+ addMessage(userId: number | string, prompt: string, response: string, threadId?: number): Promise<void>;
24
24
  /**
25
25
  * Clear the conversation history for a user
26
26
  * @param userId - the telegram user ID
27
27
  * @param threadId - optional thread ID
28
28
  */
29
- clearHistory(userId: number, threadId?: number): Promise<void>;
29
+ clearHistory(userId: number | string, threadId?: number): Promise<void>;
30
30
  }
31
31
  /**
32
32
  * Get the balance for a user, initializing it if it doesn't exist
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codebam/cf-workers-telegram-bot",
3
- "version": "12.6.6",
3
+ "version": "12.6.7",
4
4
  "description": "serverless telegram bot on cf workers",
5
5
  "main": "./dist/main.js",
6
6
  "module": "./dist/main.js",