# Class AiService Beta

Service for working with Sisense Fusion Generative AI.

Note

This service is currently under beta release for our managed cloud customers on version L2024.2 or above. It is subject to changes as we make fixes and improvements.

# Constructors

# constructor

new AiService(sisenseContextService, aiContextConfig?): AiService

# Parameters

Parameter Type
sisenseContextService SisenseContextService
aiContextConfig? AiContextConfig

# Returns

AiService

# 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

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

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