From 986ec277ff20a08102fb55834d1b94749a16d8bc Mon Sep 17 00:00:00 2001 From: Anderson Silva Date: Fri, 5 Jul 2024 15:32:01 -0500 Subject: [PATCH] Adding AISummarizeRecord --- .../power-fx/reference/function-ai.md | 29 +++++++++++++++++-- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/power-platform/power-fx/reference/function-ai.md b/power-platform/power-fx/reference/function-ai.md index 3aaa5181dc..d488fea776 100644 --- a/power-platform/power-fx/reference/function-ai.md +++ b/power-platform/power-fx/reference/function-ai.md @@ -1,6 +1,6 @@ --- -title: AISummarize, AISentiment, AIReply, AITranslate, AIClassify, and AIExtract functions -description: Reference information including syntax and examples for the AISummarize, AISentiment, AIReply, AITranslate, AIClassify, and AIExtract functions. +title: AISummarize, AISummarizeRecord, AISentiment, AIReply, AITranslate, AIClassify, and AIExtract functions +description: Reference information including syntax and examples for the AISummarize, AISummarizeRecord, AISentiment, AIReply, AITranslate, AIClassify, and AIExtract functions. author: paulliew ms.topic: reference ms.custom: canvas @@ -15,7 +15,7 @@ contributors: - mduelae --- -# AIClassify, AIExtract, AIReply, AISentiment, AISummarize, and AITranslate +# AIClassify, AIExtract, AIReply, AISentiment, AISummarize, AISummarizeRecord, and AITranslate Applies to: :::image type="icon" source="media/yes-icon.svg" border="false"::: Canvas apps @@ -36,6 +36,7 @@ Dataverse provides a variety of ready-to-use AI functions that are preconfigured - **AIReply** drafts a reply to the message that you provide. For example, this function drafts a reply to a customer's review of a product. - **AISentiment** detects the sentiment of the text that you provide. For example, this function detects whether the sentiment of a customer review is positive, negative, or neutral. - **AISummarize** summarizes the text that you provide. For example, this function summarizes an email message or text from a document. +- **AISummarizeRecord** summarizes the given entity record. For example, this function summarizes the first Accounts table record. - **AITranslate** translates text from another language. For example, this function translates a customer email or product review. The source language doesn't need to be specified, and is automatically detected. For more information about languages supported for the source and target language, see [Translator language support—Translation](/azure/ai-services/translator/language-support) and review the list of supported languages under the **Auto Language Detection** column. @@ -99,6 +100,10 @@ Here's an example: - _Text_ - Required. The text to summarize. - For canvas apps, the return value is in the _SummarizedText_ column. +**AISummarizeRecord**( _Entity_ ) +- _Entity_ - Required. The Dataverse record to summarize. +- For canvas apps, the return value is in the _SummarizedText_ column. + **AITranslate**(_Text_, _TargetLanguage_) - _Text_ - Required. The text to translate. - _TargetLanguage_ - The language tag to translate into such as "fr" for French. See the [**Language** function](./function-language.md) for more details. @@ -188,6 +193,24 @@ To setup the following examples: an abundance of high-quality seafood options. ``` +### AISummarizeRecord + +1. In canvas apps, set the **OnSelect** property of the **Button** control to: + ```power-fx + Set( Result, Environment.AISummarizeRecord( First(Accounts) ).SummarizedText ) + ``` + For all other products, use this formula: + ```power-fx + Set( Result, AISummarizeRecord( First(Accounts) ) ) + ``` +1. Press the button. The **Text** control displays a result similar to: + ``` + The record provided was created on July 2, 2024, at 17:24:32 in the selected time zone. + The account number for this record is ACC0001, associated with the company + [USMF](pagetype=entityrecord&etn=cdm_company&id=bdcdb6ff-7[204-4345](tel:2044345)-b46f-9545195385fd). + The record was last modified on July 2, 2024, at 17:24:32 in the selected time zone. + ``` + ### AISentiment 1. In canvas apps, set the **OnSelect** property of the **Button** control to: