Skip to main content

UnifiedResponseExecutor

@codebolt/agent


Interface: UnifiedResponseExecutor

Defined in: packages/agent/src/unified/types/types.ts:192

Unified response executor interface

Methods

addFollowUpConversationProcessor()

addFollowUpConversationProcessor(processor: Processor): void;

Defined in: packages/agent/src/unified/types/types.ts:208

Add a follow-up conversation processor

Parameters

ParameterType
processorProcessor

Returns

void


addPreToolCallProcessor()

addPreToolCallProcessor(processor: Processor): void;

Defined in: packages/agent/src/unified/types/types.ts:216

Add a pre-tool call processor

Parameters

ParameterType
processorProcessor

Returns

void


buildFollowUpConversation()

buildFollowUpConversation(
conversationHistory: OpenAIMessage[],
toolResults: ToolResult[],
llmResponse: any): Promise<OpenAIMessage[]>;

Defined in: packages/agent/src/unified/types/types.ts:198

Build follow-up conversation

Parameters

ParameterType
conversationHistoryOpenAIMessage[]
toolResultsToolResult[]
llmResponseany

Returns

Promise<OpenAIMessage[]>


clearFollowUpConversationProcessors()

clearFollowUpConversationProcessors(): void;

Defined in: packages/agent/src/unified/types/types.ts:214

Clear all follow-up conversation processors

Returns

void


clearPreToolCallProcessors()

clearPreToolCallProcessors(): void;

Defined in: packages/agent/src/unified/types/types.ts:222

Clear all pre-tool call processors

Returns

void


executeResponse()

executeResponse(input: UnifiedResponseInput): Promise<UnifiedResponseOutput>;

Defined in: packages/agent/src/unified/types/types.ts:194

Execute response processing including tool execution

Parameters

ParameterType
inputUnifiedResponseInput

Returns

Promise<UnifiedResponseOutput>


executeTools()

executeTools(
llmResponse: any,
tools: OpenAITool[],
context?: Record<string, any>): Promise<ToolResult[]>;

Defined in: packages/agent/src/unified/types/types.ts:196

Execute tools from LLM response

Parameters

ParameterType
llmResponseany
toolsOpenAITool[]
context?Record<string, any>

Returns

Promise<ToolResult[]>


getFollowUpConversationProcessors()

getFollowUpConversationProcessors(): Processor[];

Defined in: packages/agent/src/unified/types/types.ts:212

Get all follow-up conversation processors

Returns

Processor[]


getPreToolCallProcessors()

getPreToolCallProcessors(): Processor[];

Defined in: packages/agent/src/unified/types/types.ts:220

Get all pre-tool call processors

Returns

Processor[]


removeFollowUpConversationProcessor()

removeFollowUpConversationProcessor(processor: Processor): boolean;

Defined in: packages/agent/src/unified/types/types.ts:210

Remove a follow-up conversation processor

Parameters

ParameterType
processorProcessor

Returns

boolean


removePreToolCallProcessor()

removePreToolCallProcessor(processor: Processor): boolean;

Defined in: packages/agent/src/unified/types/types.ts:218

Remove a pre-tool call processor

Parameters

ParameterType
processorProcessor

Returns

boolean


shouldSummarizeConversation()

shouldSummarizeConversation(conversationHistory: OpenAIMessage[]): boolean;

Defined in: packages/agent/src/unified/types/types.ts:204

Check if conversation needs summarization

Parameters

ParameterType
conversationHistoryOpenAIMessage[]

Returns

boolean


summarizeConversation()

summarizeConversation(conversationHistory: OpenAIMessage[]): Promise<OpenAIMessage[]>;

Defined in: packages/agent/src/unified/types/types.ts:206

Summarize conversation

Parameters

ParameterType
conversationHistoryOpenAIMessage[]

Returns

Promise<OpenAIMessage[]>