Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion modules/ROOT/pages/api-changelog.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ This changelog lists only the changes introduced in the Visual Embed SDK. For in
You can now embed the Spotter 3 experience in your application and use features such as Auto mode for automatic data model selection, Chat history, and a new chat prompt interface.

* To enable the new chat prompt interface, set `updatedSpotterChatPrompt` to `true`.
* To use Auto mode, set the `worksheetId` to `_spotter_data_source_discovery_id`.
* To use Auto mode, set the `worksheetId` to `auto_mode`.
* To enable Chat history, set `enablePastConversationsSidebar` to `true`.

For more information, see xref:embed-spotter.adoc[Embedding Spotter] and xref:embed-ai-analytics.adoc#_feature_status_and_availability_in_embed_mode[Features available with Spotter 3 experience].
Expand All @@ -28,6 +28,11 @@ Events::
* `HostEvent.AddToCoaching` to trigger the *Add to coaching* action in a Spotter conversation session.
* `HostEvent.StartNewSpotterConversation` to trigger the action to start a new chat session with Spotter.

[NOTE]
====
On Spotter embed deployments running version 26.2.0.cl or later, the *Add to Coaching* feature is enabled by default. To disable or hide the **Add to Coaching** button, use the xref:Action.adoc#_inconversationtraining[InConversationTraining] action ID.
====

|[tag greenBackground]#NEW FEATURE# a| **Liveboard experience enhancements** +

Styling and grouping::
Expand Down
34 changes: 10 additions & 24 deletions modules/ROOT/pages/api-intercept.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ Developers can intercept data fetch and other API requests initiated by the embe
* Intercept data fetch requests: +
To enable interception of search execution requests by search embed or full application embed, use the `isOnBeforeGetVizDataInterceptEnabled` attribute. When enabled, you can implement custom logic using the `OnBeforeGetVizDataIntercept` embed event, allow or block search requests, and show custom messages to users.

* Intercept a specific API call or all requests: +
If you want to intercept other API calls initiated by the embedded application, define the URLs that you want to intercept in the `interceptUrls` attribute and handle interception using the `ApiIntercept` embed event.
* Intercept a specific API call or all API requests: +
If you want to intercept other API calls initiated by the embedded application, define the requests that you want to intercept in the `interceptUrls` attribute and handle interception using the `ApiIntercept` embed event.

Developers can use these interception features for:

Expand All @@ -34,7 +34,7 @@ const embed = new LiveboardEmbed('#embed', {
});
----

When enabled, you can intercept and control search execution and data fetch requests, and implement a custom logic to trigger a response when the `EmbedEvent.OnBeforeGetVizDataIntercept` event is emitted.
When enabled, you can intercept and control search execution and data fetch requests, and implement custom logic to trigger a response when the `EmbedEvent.OnBeforeGetVizDataIntercept` event is emitted.

The following example blocks the search request and returns a custom error message.

Expand Down Expand Up @@ -76,42 +76,28 @@ embed.on(EmbedEvent.OnBeforeGetVizDataIntercept,
})
----

== Intercept specific URLs or all API calls
== Intercept specific requests or all API calls

The API intercept feature lets you intercept API calls made by the embedded application, modify or block requests, and provide custom responses before they are sent to the backend.

////
=== Enable API interception

To enable this feature on your embed, you must set the `enableApiIntercept` flag to `true` in the SDK.

[source,JavaScript]
----
const embed = new LiveboardEmbed('#embed', {
//...viewConfig,
enableApiIntercept: true,
//...
});
----
////

To intercept API requests from specific URLs, define the URLs in the `interceptUrls` array:

Valid values for `interceptUrls` are:
To intercept API requests from specific URLs, specify one of the following values in the `interceptUrls` array:

** `ALL` - Allows intercepting all API requests +
** `AnswerData` - Allows intercepting APIs that fetch data for a search query or visualization. +
** `LiveboardData` - Allows intercepting APIs requesting data for the embedded Liveboard.
** `LiveboardData` - Allows intercepting APIs requesting data for an embedded Liveboard.

////
You can also set a specific URL that you want to intercept by specifying the array in the following format:

`interceptUrls: [Type.AnswerData, '{URL-to-intercept}']`
////

[NOTE]
====
You must specify at least one API type or URL in the array for interception to be effective. If `interceptUrls` is set as an empty array, no URLs will be intercepted.
You must specify at least one API type in the array for interception to be effective. If `interceptUrls` is set as an empty array, no API requests will be intercepted.
====


=== Intercept timeout threshold
To set a threshold for the interception handling, configure the `interceptTimeout` value in milliseconds. The default value is 30000. If the interception is not handled within the configured threshold, the API returns an error.

Expand Down
2 changes: 1 addition & 1 deletion modules/ROOT/pages/embed-ai-analytics.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ Automatic data source discovery and model selection by Spotter.

**Embed SDK component**: Use `SpotterEmbed`. +

**Default state in embed**: Disabled by default. To enable this feature, set the `worksheetId` attribute to `_spotter_data_source_discovery_id` in the SDK. When the Auto mode is enabled, the *Preview data* option in the conversation panel is hidden.
**Default state in embed**: Disabled by default. To enable this feature, set the `worksheetId` attribute to `auto_mode` in the SDK. When the Auto mode is enabled, the *Preview data* option in the conversation panel is hidden.

|link:https://docs.thoughtspot.com/cloud/latest/spotter-conversation-history[Chat history, window=_blank] +

Expand Down
5 changes: 3 additions & 2 deletions modules/ROOT/pages/embed-pinboard.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,8 @@ liveboardEmbed.trigger(HostEvent.UpdateFilters, {

=== Liveboard grouping and styling [earlyAccess eaBackground]#Early Access#
You can now create a visual group of Answers and note tiles together in the Liveboard. You can select multiple Answers and notes in the Liveboard editor. You can also style parts of the Liveboard, groups and Answers with the new styling panel.
To enable this feature, set `isLiveboardStylingAndGroupingEnabled` to `true`. It is important to note the following changes which happen in the Liveboard UI and layout when this feature is active.
To enable this feature, set `isLiveboardMasterpiecesEnabled` to `true`.
It is important to note the following changes which happen in the Liveboard UI and layout when this feature is active.

* All tiles on the Liveboard will now have a default border and an increased border-radius, resulting in more pronounced curved corners. This is part of the broader visualization tile customization options done to enhance the visual appearance of charts and tables.
* For Note tiles, the default scrollbar is now hidden for long content. Users must scroll within the tile area itself, and if the tile is not sized appropriately for its content, it may appear clipped due to the new container styles. This change emphasizes the importance of properly sizing Note tiles to avoid content being visually cut off.
Expand All @@ -515,7 +516,7 @@ To enable this feature, set `isLiveboardStylingAndGroupingEnabled` to `true`. It
image::./images/lb-grp-styling-error.png[Liveboard with groups styling error]
--
+
To embed a Liveboard that uses Groups, you must set `isLiveboardStylingAndGroupingEnabled` to `true` in your embedding configuration. This is required for compatibility with the new grouping and styling features; otherwise, the embedded Liveboard will not render correctly.
To embed a Liveboard that uses Groups, you must set `isLiveboardMasterpiecesEnabled` to `true` in your embedding configuration. This is required for compatibility with the new grouping and styling features; otherwise, the embedded Liveboard will not render correctly.

For more information, see link:https://docs.thoughtspot.com/cloud/latest/liveboard-grouping-styling[Liveboard grouping and styling, window=_blank].

Expand Down
4 changes: 2 additions & 2 deletions modules/ROOT/pages/embed-spotter.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const spotterEmbed = new SpotterEmbed(document.getElementById('ts-embed'), {
width: '100%',
height: '100%',
},
worksheetId: '<%=datasourceGUID%>', // ID of the data source object. To use the Auto mode, set the ID to '_spotter_data_source_discovery_id',
worksheetId: '<%=datasourceGUID%>', // ID of the data source object. To use the Auto mode, set the ID to 'auto_mode',
//... other attributes
});
----
Expand Down Expand Up @@ -457,7 +457,7 @@ if (container) {
height: '100%', // Set the height of the embedded frame
width: '100%', // Set the width of the embedded frame
},
worksheetId: 'your-worksheet-id', // ID of the data source object to query data from. For automatic model discovery and selection (Auto mode), specify '_spotter_data_source_discovery_id'
worksheetId: 'your-worksheet-id', // ID of the data source object to query data from. For automatic model discovery and selection (Auto mode), specify 'auto_mode'
updatedSpotterChatPrompt: true, // Enable new chat interface
enablePastConversationsSidebar: true, // Enable chat history
//... other configuration attributes
Expand Down
5 changes: 3 additions & 2 deletions modules/ROOT/pages/spotter-apis.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -990,7 +990,7 @@ The following example shows the response text contents for the `answer` message
The session ID and generation number serve as the data context for the Answer. You can use this information to create a new conversation session using `/api/rest/2.0/ai/agent/conversation/create`, or download the answer via the `/api/rest/2.0/report/answer` API endpoint.

[#process_results]
== Process results generated from Spotter APIs
== Processing results generated from Spotter APIs
To export or download the Answer data generated by the Spotter APIs, use the xref:data-report-v2-api.adoc#exportSpotterData[Answer report] API.

[NOTE]
Expand All @@ -1009,7 +1009,7 @@ The `POST /api/rest/2.0/ai/data-source-suggestions` API provides relevant data s

[width="100%" cols="2,4"]
[options='header']
|=====
|====
|Parameter| Description
|`metadata_context` a| Required. Specify one of the following attributes to set the metadata context:

Expand All @@ -1029,6 +1029,7 @@ __Optional__ | __Integer__. Sets a limit on the number of sub-questions to retur
__Optional__| __Boolean__. When set to `true`, disables cache and forces fresh computation.
|`ai_context` +
__Optional__. a| Additional context to guide the response. Define the following attributes as needed:
|====

==== Example request

Expand Down
Loading