@coveo/headless
    Preparing search index...

    Interface GeneratedAnswerWithFollowUpsState

    A scoped and simplified part of the headless state that is relevant to the GeneratedAnswer component.

    interface GeneratedAnswerWithFollowUpsState {
        answer?: string;
        answerApiQueryParams?: AnswerApiQueryParams;
        answerConfigurationId?: string;
        answerContentFormat?: "text/plain" | "text/markdown";
        answerGenerationMode: "automatic" | "manual";
        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;
        };
        expanded: boolean;
        feedbackModalOpen: boolean;
        feedbackSubmitted: boolean;
        fieldsToIncludeInCitations: string[];
        followUpAnswers: FollowUpAnswersState;
        generationSteps: GenerationStep[];
        id: string;
        isAnswerGenerated: boolean;
        isEnabled: boolean;
        isLoading: boolean;
        isStreaming: boolean;
        isVisible: boolean;
        liked: boolean;
        responseFormat: GeneratedResponseFormat;
    }

    Hierarchy (View Summary)

    Index

    Properties

    answer?: string

    The generated answer.

    answerApiQueryParams?: AnswerApiQueryParams

    The query parameters used for the answer API request cache key

    answerConfigurationId?: string

    The answer configuration unique identifier.

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

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

    • text/plain
    • text/markdown
    answerGenerationMode: "automatic" | "manual"

    The current mode of answer generation.

    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.

    expanded: boolean

    Whether the answer is expanded.

    feedbackModalOpen: boolean

    Determines if the feedback modal is currently opened.

    feedbackSubmitted: boolean

    Determines if the generated answer feedback was submitted.

    fieldsToIncludeInCitations: string[]

    A list of indexed fields to include in the citations returned with the generated answer.

    followUpAnswers: FollowUpAnswersState
    generationSteps: GenerationStep[]

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

    id: string
    isAnswerGenerated: boolean

    Determines if the answer is generated.

    isEnabled: boolean

    Determines if the generated answer is enabled.

    isLoading: boolean

    Determines if the generated answer is loading.

    isStreaming: boolean

    Determines if the generated answer is streaming.

    isVisible: boolean

    Determines if the generated answer is visible.

    liked: boolean

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

    responseFormat: GeneratedResponseFormat

    The desired format options for the generated answer.