UNPKG

@rinkuto/koishi-plugin-chatgpt

Version:
55 lines (54 loc) 1.57 kB
import { Config } from "./Config"; export declare class MemoryManager { private static userMemory; private static groupMemory; private static config; static getMemory(id: string, isPerson?: boolean): Memories | undefined; static addMemory(userId: string, username: string, content: { user: string; bot: string; }, groupId?: string): void; static createUserMemory(userId: string, username: string, groupId?: string): void; static setConfig(config: Config): void; static clearMemory(id: string, isPerson?: boolean): void; } export declare class Memories { readonly memories: Memory[]; private readonly maxMemoryLength; username: string; userId: string; isPerson: boolean; addMemory(userId: string, username: string, content: { user: string; bot: string; }): void; constructor(maxMemoryLength: number, username?: string, userId?: string); getMemory(): { user: { name: string; userId: string; content: string; }; bot: { content: string; }; }[]; } export declare class Memory { private readonly user; private readonly bot; constructor(userId: string, username: string, content: { user: string; bot: string; }); getMemory(): { user: { name: string; userId: string; content: string; }; bot: { content: string; }; }; }