koishi-plugin-satori-ai 1.4.2 → 2.0.0

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/lib/api.d.ts CHANGED
@@ -10,10 +10,15 @@ export declare class APIClient {
10
10
  error: boolean;
11
11
  reasoning_content?: string;
12
12
  }>;
13
- auxiliaryChat(messages: Sat.Msg[]): Promise<{
13
+ auxiliaryChat(messages: Sat.Msg[], user?: User | null): Promise<{
14
14
  content: string;
15
15
  error: boolean;
16
16
  }>;
17
+ /**
18
+ * 辅助请求的路由:持票且配置完整时走用户的 key/model,否则回退默认辅助模型。
19
+ * 不完整的票配置不能让后台归档静默失败,所以这里降级并告警。
20
+ */
21
+ private resolveAuxiliaryRoute;
17
22
  generateUserPortrait(user: User, messages: Sat.Msg[]): Promise<{
18
23
  content: string;
19
24
  error: boolean;
package/lib/emoji.d.ts ADDED
@@ -0,0 +1,14 @@
1
+ import { Context, Session } from 'koishi';
2
+ import { Sat, User } from './types';
3
+ export declare class EmojiManager {
4
+ private ctx;
5
+ private config;
6
+ private categories;
7
+ private emojiDir;
8
+ constructor(ctx: Context, config: Sat.Config);
9
+ private loadEmojis;
10
+ shouldSendEmoji(): boolean;
11
+ getEmoji(session: Session, user: User, recentMessages: Sat.Msg[]): Promise<string | null>;
12
+ private getAPIConfig;
13
+ private callLLM;
14
+ }
package/lib/index.d.ts CHANGED
@@ -8,8 +8,7 @@ export declare function refreshPuppeteer(ctx: Context): void;
8
8
  export declare class SAT extends Sat {
9
9
  config: Sat.Config;
10
10
  private apiClient;
11
- private memoryManager;
12
- private portraitManager;
11
+ private memoryService;
13
12
  private ChannelParallelCount;
14
13
  private onlineUsers;
15
14
  private moodManager;
@@ -19,6 +18,7 @@ export declare class SAT extends Sat {
19
18
  private puppeteer;
20
19
  private game;
21
20
  private galgame;
21
+ private emojiManager;
22
22
  setPuppeteer(puppeteer: Puppeteer): void;
23
23
  private waitForPuppeteer;
24
24
  puppeteerReady(): boolean;