diff --git a/packages/core/src/core/processors/research-processor.ts b/packages/core/src/core/processors/research-processor.ts index 37ca5937..5adb9f04 100644 --- a/packages/core/src/core/processors/research-processor.ts +++ b/packages/core/src/core/processors/research-processor.ts @@ -1,5 +1,5 @@ import { LLMClient } from "../llm-client"; -import type { Character } from "../types"; +import type { ActionIOHandler, Character, OutputIOHandler } from "../types"; import { LogLevel } from "../types"; import { getTimeContext, validateLLMResponseSchema } from "../utils"; import { z } from "zod"; @@ -199,7 +199,9 @@ export class ResearchQuantProcessor extends BaseProcessor { } } - private buildHandlerSchemaPart(handlers?: IOHandler[]): string { + private buildHandlerSchemaPart( + handlers?: OutputIOHandler[] | ActionIOHandler[] + ): string { if (!handlers || handlers.length === 0) return "None"; return handlers .filter((handler) => handler.outputSchema) @@ -217,8 +219,8 @@ export class ResearchQuantProcessor extends BaseProcessor { private async combineChunkResults( results: any[], ioContext?: { - availableOutputs: IOHandler[]; - availableActions: IOHandler[]; + availableOutputs: OutputIOHandler[]; + availableActions: ActionIOHandler[]; } ): Promise { const prompt = ` @@ -321,8 +323,8 @@ export class ResearchQuantProcessor extends BaseProcessor { content: any, otherContext: string, ioContext?: { - availableOutputs: IOHandler[]; - availableActions: IOHandler[]; + availableOutputs: OutputIOHandler[]; + availableActions: ActionIOHandler[]; } ): Promise { const contentStr =