@coveo/headless
    Preparing search index...

    Interface GeneratedAnswerBase

    Base interface for generated answer structures. Contains core properties shared across different generated answer implementations.

    interface GeneratedAnswerBase {
        answer?: string;
        answerContentFormat?: "text/plain" | "text/markdown";
        answerId?: string;
        cannotAnswer: boolean;
        citations: GeneratedAnswerCitation[];
        disliked: boolean;
        error?: {
            code?: number;
            isRetryable?: boolean;
            message?: string;
            isConversationNotFoundError?(): boolean;
            isFollowupNotSupportedError?(): boolean;
            isMaxDurationExceededError?(): boolean;
            isSseInternalError?(): boolean;
            isSseModelNotAvailableError?(): boolean;
            isSseTurnLimitReachedError?(): boolean;
        };
        feedbackSubmitted: boolean;
        generationSteps: GenerationStep[];
        isLoading: boolean;
        isStreaming: boolean;
        liked: boolean;
    }

    Hierarchy (View Summary)

    Index

    Properties

    answer?: string

    The generated answer.

    answerContentFormat?: "text/plain" | "text/markdown"

    The content format of the generated answer. Possible values are:

    • text/plain
    • text/markdown
    answerId?: string

    The unique identifier of the answer returned by the backend.

    cannotAnswer: boolean

    Whether an answer cannot be generated after a query is executed.

    The document snippets retrieved to generate the answer.

    disliked: boolean

    Determines if the generated answer is disliked, or downvoted by the end user.

    error?: {
        code?: number;
        isRetryable?: boolean;
        message?: string;
        isConversationNotFoundError?(): boolean;
        isFollowupNotSupportedError?(): boolean;
        isMaxDurationExceededError?(): boolean;
        isSseInternalError?(): boolean;
        isSseModelNotAvailableError?(): boolean;
        isSseTurnLimitReachedError?(): boolean;
    }

    The generated answer error.

    feedbackSubmitted: boolean

    Determines if the generated answer feedback was submitted.

    generationSteps: GenerationStep[]

    The list of steps involved in generating the answer, along with their status and timestamps.

    isLoading: boolean

    Determines if the generated answer is loading.

    isStreaming: boolean

    Determines if the generated answer is streaming.

    liked: boolean

    Determines if the generated answer is liked, or upvoted by the end user.