Skip to content

Commit

Permalink
types
Browse files Browse the repository at this point in the history
  • Loading branch information
ponderingdemocritus committed Jan 29, 2025
1 parent 841f0d0 commit 1ab2450
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions packages/core/src/core/processors/research-processor.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -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)
Expand All @@ -217,8 +219,8 @@ export class ResearchQuantProcessor extends BaseProcessor {
private async combineChunkResults(
results: any[],
ioContext?: {
availableOutputs: IOHandler[];
availableActions: IOHandler[];
availableOutputs: OutputIOHandler[];
availableActions: ActionIOHandler[];
}
): Promise<any> {
const prompt = `
Expand Down Expand Up @@ -321,8 +323,8 @@ export class ResearchQuantProcessor extends BaseProcessor {
content: any,
otherContext: string,
ioContext?: {
availableOutputs: IOHandler[];
availableActions: IOHandler[];
availableOutputs: OutputIOHandler[];
availableActions: ActionIOHandler[];
}
): Promise<any> {
const contentStr =
Expand Down

0 comments on commit 1ab2450

Please sign in to comment.