@avvyr/storefront-sdk - v0.19.0
    Preparing search index...

    Interface SendAssistantMessageOptions

    interface SendAssistantMessageOptions {
        attachmentIds?: string[];
        cart?: { id: string; token?: string | null } | null;
        context?: AssistantContext;
        onEvent?: (event: AssistantStreamEvent) => void;
        signal?: AbortSignal;
        visitorId?: string;
    }
    Index
    attachmentIds?: string[]

    Photos uploaded with AssistantResource.uploadAttachments to send with this message (at most 3). With ids, the message text may be empty. Without, the server takes every photo uploaded since the last message.

    cart?: { id: string; token?: string | null } | null

    The shopper's cart, so the assistant can read and change it. token is the cart access token (sent as x-cart-token); leave it out when it is already set on the client with cart.setAccessToken. Used only for this turn, never stored with the conversation. Without a cart the assistant creates one when asked to add something (see the cart event).

    Where the shopper is now (updates the conversation's context).

    onEvent?: (event: AssistantStreamEvent) => void

    Called for every streamed event, in order.

    signal?: AbortSignal

    Abort to stop the answer. The server stops the model too.

    visitorId?: string

    The pseudonymous visitor id, as for createConversation. Only with statistics consent.