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

Function useGetNlqResult Beta

useGetNlqResult(params): UseGetNlqResultState

A Vue composable that enables natural language query (NLQ) against a data model or perspective.

Parameters

ParameterTypeDescription
paramsMaybeRefOrWithRefs< UseGetNlqResultParams >UseGetNlqResultParams

Returns

UseGetNlqResultState

The composable NLQ load state that contains the status of the execution, the result (data) as WidgetProps

Example

<script setup lang="ts">
import { ChartWidget } from '@sisense/sdk-ui-vue';
import { useGetNlqResult, type UseGetNlqResultParams } from '@sisense/sdk-ui-vue/ai';

const params: UseGetNlqResultParams = {
 dataSource: 'Sample Retail',
 query: 'Show me the lowest product prices by country'
};
const { data: nlqResult } = useGetNlqResult(params);
</script>

<template>
 <ChartWidget v-bind="nlqResult" />
</template>
Last Updated: