Theia API Documentation v1.71.0
    Preparing search index...

    The ChatResponseModel wraps the actual ChatResponse with additional information like the current state, progress messages, a unique id etc.

    interface ChatResponseModel {
        agentId?: string;
        data: { [key: string]: unknown };
        errorObject?: Error;
        id: string;
        isCanceled: boolean;
        isComplete: boolean;
        isError: boolean;
        isPromptVariantEdited?: boolean;
        isWaitingForInput: boolean;
        onDidChange: Event<void>;
        onInteractionNeeded: Event<InteractiveContent & ChatResponseContent>;
        progressMessages: ChatProgressMessage[];
        promptVariantId?: string;
        requestId: string;
        response: ChatResponse;
        tokenUsage?: ResponseTokenUsage;
        toSerializable(): SerializableChatResponseData;
    }

    Implemented by

    Index

    Properties

    agentId?: string

    The agent who produced the response content, if there is one.

    data: { [key: string]: unknown }

    Some functionality might want to store some data associated with the response. This can be used to store and retrieve such data.

    errorObject?: Error

    An optional error object that caused the response to be in an error state.

    id: string

    The unique identifier of the response model

    isCanceled: boolean

    Indicates whether this response is canceled. No further changes are expected if 'true'.

    isComplete: boolean

    Indicates whether this response is complete. No further changes are expected if 'true'.

    isError: boolean

    Indicates whether an error occurred when processing the response. No further changes are expected if 'true'.

    isPromptVariantEdited?: boolean

    Indicates whether the prompt variant was customized/edited

    isWaitingForInput: boolean

    Some agents might need to wait for user input to continue. This flag indicates that.

    onDidChange: Event<void>

    Use this to be notified for any change in the response model

    Fires when this response requires user interaction (e.g., tool confirmation, question response). The content part that needs interaction is provided as the event payload.

    progressMessages: ChatProgressMessage[]

    In case there are progress messages, then they will be stored here

    promptVariantId?: string

    The ID of the prompt variant used to generate this response

    requestId: string

    The unique identifier of the request model this response is associated with

    response: ChatResponse

    The actual response content

    tokenUsage?: ResponseTokenUsage

    Methods