# Class AiService
Service for working with Sisense Fusion Generative AI.
# Constructors
# constructor
new AiService(
sisenseContextService,aiContextConfig?):AiService
# Parameters
| Parameter | Type |
|---|---|
sisenseContextService | SisenseContextService |
aiContextConfig? | AiContextConfig |
# Returns
# Methods
# getNlgInsights
getNlgInsights(
params):Promise<string|undefined>
Fetches an analysis of the provided query using natural language generation (NLG). Specifying NLG parameters is similar to providing parameters to the QueryService.executeQuery service method, using dimensions, measures, and filters.
# Parameters
| Parameter | Type | Description |
|---|---|---|
params | GetNlgInsightsParams | Parameters for getting NLG insights |
# Returns
Promise< string | undefined >
NLG insights text summary
# getNlqResult Beta
getNlqResult(
params):Promise<WidgetProps|undefined>
Executes a natural language query (NLQ) against a data model or perspective
# Parameters
| Parameter | Type | Description |
|---|---|---|
params | GetNlqResultParams | NLQ query parameters |
# Returns
Promise< WidgetProps | undefined >
The result as WidgetProps
# getQueryRecommendations Beta
getQueryRecommendations(
params):Promise<QueryRecommendation[] >
Fetches recommended questions for a data model or perspective.
# Parameters
| Parameter | Type | Description |
|---|---|---|
params | GetQueryRecommendationsParams | Parameters for recommendations |
# Returns
Promise< QueryRecommendation[] >
An array of objects, each containing recommended question text and its corresponding widgetProps