UNPKG

flux-agent

Version:

FluxAgent - 一个可灵活插拔的AI Agent系统框架,基于TypeScript开发,支持流式执行、事件系统、插件系统、知识库管理等功能 (Protected Release) (Protected Release) (Protected Release) (Protected Release) (Protected Release) (Protected Release) (Protected Release) (Protected Release) (Protected Release) (

21 lines (20 loc) 792 B
import { Message } from './LLM'; import { ToolInfo, TagedPrompt } from './execution/types'; export { Message } from './LLM'; export declare class Memory { private messages; constructor(systemPrompt?: string); applyMessages(messages: Message[]): void; addSystemMessage(content: string): void; addUserMessage(tagedPrompt: TagedPrompt): Message; addAssistantMessage(content: string): void; addFunctionMessage(toolInfo: ToolInfo, content: string): void; addMessage(message: Message): void; hasMessage(content: string): boolean; getMessages(): Message[]; getLastMessage(): Message | undefined; getLastDeclearMessage(): Message | undefined; getMessagesByRole(role: Message['role']): Message[]; getMessageCount(): number; clear(): void; }