Interface ChatResponse<D, M>

Response sent back to the client after processing a chat request.

interface ChatResponse<D, M> {
    data?: D;
    intermediateSteps?: IntermediateStep[];
    message?: string;
    metadata?: M;
    toolCalls?: ToolCall[];
}

Type Parameters

Hierarchy

  • Pick<AgentResponse<D>, "message" | "data" | "toolCalls" | "intermediateSteps">
    • ChatResponse

Properties

data?: D

Additional data that can be sent back to the client.

intermediateSteps?: IntermediateStep[]

Intermediate steps that the agent has taken. This can be used for debugging or logging purposes, or to provide additional context to the client.

message?: string

Message to be sent back to the client.

metadata?: M
toolCalls?: ToolCall[]

Tool calls that needs to be executed on the client-side.