import { SpotterAgentEmbed } from '@thoughtspot/visual-embed-sdk';
const conversation = new SpotterAgentEmbed({
worksheetId: 'worksheetId',
});
const { container, error } = await conversation.sendMessage('show me sales by region');
// append the container to the DOM
document.body.appendChild(container); // or to any other element
SpotterAgentEmbed
Create a conversation embed, which can be integrated inside chatbots or other conversational interfaces.
Version : SDK: 1.37.0 | ThoughtSpot: 10.9.0.cl
Constructors🔗
new SpotterAgentEmbed(viewConfig: SpotterAgentEmbedViewConfig ) : SpotterAgentEmbed
Function Parameters
- viewConfig
-
-
viewConfig: SpotterAgentEmbedViewConfig
-
Returns
Defined in : embed/bodyless-conversation.ts
Methods🔗
sendMessage🔗
sendMessage(userMessage: string ) : Promise< {container: undefined , error: any , viz?: undefined = …​} | {container: HTMLDivElement , error: undefined , viz?: ConversationMessage = …​} >
Function Parameters
- userMessage
-
-
userMessage: string
-
Returns
Promise< {container: undefined , error: any , viz?: undefined = …​} | {container: HTMLDivElement , error: undefined , viz?: ConversationMessage = …​} >
Defined in : embed/bodyless-conversation.ts
sendMessageData🔗
sendMessageData(userMessage: string ) : Promise< {data?: undefined = …​, error: any } | {data?: {acGenNo?: any = …​, acSessionId?: any = …​, convId?: any = …​, genNo?: any = …​, messageId?: any = …​, sessionId?: any = …​} = …​, error: undefined } >
Send a message to the conversation service and return only the data.
Function Parameters
- userMessage
-
-
userMessage: string
-
The message to send to the conversation service.
Returns
Promise< {data?: undefined = …​, error: any } | {data?: {acGenNo?: any = …​, acSessionId?: any = …​, convId?: any = …​, genNo?: any = …​, messageId?: any = …​, sessionId?: any = …​} = …​, error: undefined } >
Defined in : embed/bodyless-conversation.ts