Interface BusEventChunkUserDefinedResponse

interface BusEventChunkUserDefinedResponse {
    data: {
        chunk: PartialOrCompleteItemChunk;
        element?: HTMLElement;
        fullWidth?: boolean;
        messageItem: {
            agent_message_type?: AgentMessageType;
            message_options?: {
                chain_of_thought?: {
                    description?: string;
                    request?: { args?: {} };
                    response?: { content?: {} };
                    status?: ChainOfThoughtStepStatus;
                    title?: string;
                    tool_name?: string;
                }[];
                feedback?: {
                    categories?: string[];
                    disclaimer?: string;
                    id?: string;
                    is_on?: boolean;
                    placeholder?: string;
                    prompt?: string;
                    show_negative_details?: boolean;
                    show_positive_details?: boolean;
                    show_prompt?: boolean;
                    show_text_area?: boolean;
                    title?: string;
                };
            };
            response_type?: MessageResponseTypes;
            streaming_metadata?: {
                cancellable?: boolean;
                id?: string;
                stream_stopped?: boolean;
            };
            user_defined?: { [key: string]: {} };
        };
        slot?: string;
    };
    type: CHUNK_USER_DEFINED_RESPONSE;
}

Hierarchy (View Summary, Expand)

  • BusEvent
    • BusEventChunkUserDefinedResponse

Properties

Properties

data: {
    chunk: PartialOrCompleteItemChunk;
    element?: HTMLElement;
    fullWidth?: boolean;
    messageItem: {
        agent_message_type?: AgentMessageType;
        message_options?: {
            chain_of_thought?: {
                description?: string;
                request?: { args?: {} };
                response?: { content?: {} };
                status?: ChainOfThoughtStepStatus;
                title?: string;
                tool_name?: string;
            }[];
            feedback?: {
                categories?: string[];
                disclaimer?: string;
                id?: string;
                is_on?: boolean;
                placeholder?: string;
                prompt?: string;
                show_negative_details?: boolean;
                show_positive_details?: boolean;
                show_prompt?: boolean;
                show_text_area?: boolean;
                title?: string;
            };
        };
        response_type?: MessageResponseTypes;
        streaming_metadata?: {
            cancellable?: boolean;
            id?: string;
            stream_stopped?: boolean;
        };
        user_defined?: { [key: string]: {} };
    };
    slot?: string;
}

Type declaration

  • chunk: PartialOrCompleteItemChunk

    The full chunk that contained the user defined response.

  • Optionalelement?: HTMLElement

    The element to which customers can add the custom code to render for the custom response.

  • OptionalfullWidth?: boolean

    An assignable property that the event listener can assign that will indicate if the response is supposed to be full width.

  • messageItem: {
        agent_message_type?: AgentMessageType;
        message_options?: {
            chain_of_thought?: {
                description?: string;
                request?: { args?: {} };
                response?: { content?: {} };
                status?: ChainOfThoughtStepStatus;
                title?: string;
                tool_name?: string;
            }[];
            feedback?: {
                categories?: string[];
                disclaimer?: string;
                id?: string;
                is_on?: boolean;
                placeholder?: string;
                prompt?: string;
                show_negative_details?: boolean;
                show_positive_details?: boolean;
                show_prompt?: boolean;
                show_text_area?: boolean;
                title?: string;
            };
        };
        response_type?: MessageResponseTypes;
        streaming_metadata?: {
            cancellable?: boolean;
            id?: string;
            stream_stopped?: boolean;
        };
        user_defined?: { [key: string]: {} };
    }

    The individual message item that is being displayed in this custom response.

    • Optionalagent_message_type?: AgentMessageType

      For messages that are sent between the user and a human agent, we assign an agent type to the message to distinguish what type it is.

    • Optionalmessage_options?: {
          chain_of_thought?: {
              description?: string;
              request?: { args?: {} };
              response?: { content?: {} };
              status?: ChainOfThoughtStepStatus;
              title?: string;
              tool_name?: string;
          }[];
          feedback?: {
              categories?: string[];
              disclaimer?: string;
              id?: string;
              is_on?: boolean;
              placeholder?: string;
              prompt?: string;
              show_negative_details?: boolean;
              show_positive_details?: boolean;
              show_prompt?: boolean;
              show_text_area?: boolean;
              title?: string;
          };
      }

      Options that control additional features available for a message item.

      • Optionalchain_of_thought?: {
            description?: string;
            request?: { args?: {} };
            response?: { content?: {} };
            status?: ChainOfThoughtStepStatus;
            title?: string;
            tool_name?: string;
        }[]

        Controls the display of chain of thought component. This API is in beta and is subject to change.

      • Optionalfeedback?: {
            categories?: string[];
            disclaimer?: string;
            id?: string;
            is_on?: boolean;
            placeholder?: string;
            prompt?: string;
            show_negative_details?: boolean;
            show_positive_details?: boolean;
            show_prompt?: boolean;
            show_text_area?: boolean;
            title?: string;
        }

        Controls the display of a feedback options (thumbs up/down) for a message item.

        • Optionalcategories?: string[]

          An optional set of categories to allow the user to choose from.

        • Optionaldisclaimer?: string

          The legal disclaimer text to show at the bottom of the popup. This text may contain rich markdown content. If this value is not provided, no text will be shown.

        • Optionalid?: string

          A unique identifier for this feedback. This is required for the feedback to be recorded in message history.

        • Optionalis_on?: boolean

          Indicates if a request for feedback should be displayed.

        • Optionalplaceholder?: string

          The placeholder to show in the text area. A default value will be used if no value is provided here.

        • Optionalprompt?: string

          The prompt text to display to the user. A default value will be used if no value is provided here.

        • Optionalshow_negative_details?: boolean

          Indicates if the user should be asked for additional detailed information when providing negative feedback. This defaults to true.

        • Optionalshow_positive_details?: boolean

          Indicates if the user should be asked for additional detailed information when providing positive feedback. This defaults to true.

        • Optionalshow_prompt?: boolean

          Indicates whether the prompt line should be shown. This defaults to true.

        • Optionalshow_text_area?: boolean

          Indicates whether the text area should be shown. This defaults to true.

        • Optionaltitle?: string

          The title to display in the popup. A default value will be used if no value is provided here.

    • Optionalresponse_type?: MessageResponseTypes

      The response type of this message item.

    • Optionalstreaming_metadata?: { cancellable?: boolean; id?: string; stream_stopped?: boolean }

      Metadata used identify a generic item within the context of a stream in order to correlate any updates meant for a specific item.

      • Optionalcancellable?: boolean

        When included on a partial_item, indicates if the stream can be cancelled. If so, a "stop streaming" button will display in the UI.

      • Optionalid?: string

        An identifier for this item within the full message response. This ID is used to correlate a partial or complete item chunk with other chunks that represent the same item. This ID is only unique for a given message response.

      • Optionalstream_stopped?: boolean

        Indicates if the stream has stopped which will trigger the UI to respond with appropriate a11y states and messaging.

    • Optionaluser_defined?: { [key: string]: {} }

      An optional buckets of additional user defined properties for this item.

  • Optionalslot?: string

    The slot name for users of the web components cds-aichat-container or cds-aichat-custom-element.

The type of this event.

MMNEPVFCICPMFPCPTTAAATR