Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding AISummarizeRecord #2652

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 26 additions & 3 deletions power-platform/power-fx/reference/function-ai.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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

Expand All @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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:
Expand Down
Loading