✅ You are viewing documentation for the latest version of Compose SDK.
Version:

# Class GetNlgInsights

A Vue component that fetches and displays a collapsible analysis of the provided query using natural language generation (NLG). Specifying a query is similar to providing parameters to a useExecuteQuery composable, using dimensions, measures, and filters.

# Example

Here's how you can use the GetNlgInsights component in a Vue application:

<script setup lang="ts">
import { GetNlgInsights, type GetNlgInsightsProps } from '@sisense/sdk-ui-vue/ai';
import { measureFactory } from '@sisense/sdk-data';
import * as DM from '../assets/sample-retail-model';

const props: GetNlgInsightsProps = {
 dataSource: DM.DataSource.title,
 dimensions: [DM.DimProducts.CategoryName],
 measures: [measureFactory.sum(DM.DimProducts.Price)],
};
</script>

<template>
 <GetNlgInsights
   :dataSource="props.dataSource"
   :dimensions="props.dimensions"
   :measures="props.measures"
 />
</template>

# Param

GetNlgInsightsProps

# Properties

# dataSource

readonly dataSource: DataSource

The data source that the query targets - e.g. Sample ECommerce


# dimensions

readonly dimensions?: Attribute[]

Dimensions of the query


# filters

readonly filters?: FilterRelations | Filter[]

Filters of the query


# measures

readonly measures?: Measure[]

Measures of the query


# verbosity

readonly verbosity?: "High" | "Low"

The verbosity of the NLG summarization