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) (
34 lines (33 loc) • 968 B
TypeScript
import { PhaseType } from '../Phases';
import { LLMStreamCallbacks } from '../LLM';
import { ExecutionSession } from './ExecutionSession';
import { LLMResult, TagedPrompt } from './types';
/**
* LLM 协调器
* 负责与LLM的交互和响应处理
*/
export declare class LLMOrchestrator {
private agent;
constructor(agent: any);
/**
* 流式与LLM进行交互
*/
interactStream(phase: PhaseType, session: ExecutionSession, tagedPrompt: TagedPrompt, callbacks?: LLMStreamCallbacks): Promise<LLMResult>;
/**
* 根据当前阶段获取工具集
*/
private getToolsForPhase;
/**
* 验证LLM响应的有效性
*/
validateResponse(llmResult: LLMResult): boolean;
/**
* 记录LLM响应到上下文
*/
recordResponse(llmResult: LLMResult): void;
/**
* 创建空的 LLM 返回结果
*/
createEmptyLLMResult(phase: PhaseType): LLMResult;
private createStopEventPromise;
}