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
BodylessConversation
Create a conversation embed, which can be integrated inside chatbots or other conversational interfaces.
Deprecated : from SDK: 1.38.0 | ThoughtSpot: 10.10.0.clUse {@link SpotterAgentEmbed} instead
Constructors🔗
new BodylessConversation(viewConfig: BodylessConversationViewConfig ) : BodylessConversation
Function Parameters
- viewConfig
-
-
viewConfig: BodylessConversationViewConfig
-
Returns
Defined in : embed/bodyless-conversation.ts
Overrides SpotterAgentEmbed.constructor
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
Inherited from SpotterAgentEmbed.sendMessage