UNPKG

@difizen/magent-au

Version:
39 lines 1.63 kB
import type { ChatEventChunk, IChatEvent } from '@difizen/magent-chat'; import { Fetcher } from '@difizen/magent-core'; import { AgentManager } from '../agent/agent-manager.js'; import { AUAgentChatMessageItem } from './ai-message-item.js'; import type { AUChatMessageItemOption, ChatEventResult, ChatEventStep, StepContent } from './protocol.js'; export declare class PeerChatMessageItem extends AUAgentChatMessageItem { contentMap: Record<string, string>; planningPlanner: string; executingPlanner: string; expressingPlanner: string; reviewingPlanner: string; steps: ChatEventStep[]; lastChunkAgent?: string; received: boolean; currRound: number; roundsContent: StepContent[]; protected currRoundContent: StepContent; protected _isConstructorInitialized: boolean; constructor(option: AUChatMessageItemOption, fetcher: Fetcher, agentManager: AgentManager); /** * @param roundStartsAt 当前轮从第几步开始 */ protected addEmptyRoundContent: (roundStartsAt: number) => void; initialize: () => Promise<void>; get content(): string; set content(v: string); /** * * @param agent_id 当前chunk的agent_id * 判断当前是不是需要开启新的一轮对话执行。 */ protected judgeAndAddEmptyRound: (agent_id: string) => void; appendChunk(e: ChatEventChunk): void; protected toContentStr: (out: string | string[]) => string; handleEventData(e: IChatEvent): void; handleSteps(e: ChatEventStep): void; handleResult(e: ChatEventResult): void; } //# sourceMappingURL=peer-message-item-model.d.ts.map