Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 4d6bb68

Browse files
DevExpressExampleBotDevExpressExampleBot
DevExpressExampleBot
authored and
DevExpressExampleBot
committed
README auto update [skip ci]
1 parent e7d6e4d commit 4d6bb68

File tree

1 file changed

+46
-46
lines changed

1 file changed

+46
-46
lines changed

‎README.md

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,46 @@
1-
<!-- default badges list -->
2-
![](https://img.shields.io/endpoint?url=https://codecentral.devexpress.com/api/v1/VersionRange/794940392/23.2.5%2B)
3-
[![](https://img.shields.io/badge/Open_in_DevExpress_Support_Center-FF7200?style=flat-square&logo=DevExpress&logoColor=white)](https://supportcenter.devexpress.com/ticket/details/T1231021)
4-
[![](https://img.shields.io/badge/📖_How_to_use_DevExpress_Examples-e9f6fc?style=flat-square)](https://docs.devexpress.com/GeneralInformation/403183)
5-
[![](https://img.shields.io/badge/💬_Leave_Feedback-feecdd?style=flat-square)](#does-this-example-address-your-development-requirementsobjectives)
6-
<!-- default badges end -->
7-
# Office File API – Integrate AI
8-
9-
The following project integrates AI capabilities into a DevExpress-powered Office File API Web API application. This project uses the following AI services:
10-
* OpenAI API generates descriptions for images, charts and hyperlinks in Microsoft Word and Excel files.
11-
* Azure AI Language API detects the language for text paragraphs in Word files.
12-
* Azure AI Translator API translates paragraph text to the chosen language in Word files.
13-
14-
> [!note]
15-
> Before you incorporate this solution in your app, please be sure to read and understand terms and conditions of using AI services.
16-
17-
## Implementation Details
18-
19-
The project uses the [Azure.AI.OpenAI](https://www.nuget.org/packages/Azure.AI.OpenAI/), [Azure.AI.TextAnalytics](https://www.nuget.org/packages/Azure.AI.TextAnalytics) and [Azure.AI.Translation.Text](https://www.nuget.org/packages/Azure.AI.Translation.Text) NuGet packages. Azure.AI.OpenAI adapts OpenAI's REST APIs for use in non-Azure OpenAI development. Azure.AI.TextAnalytics and Azure.AI.Translation.Text require an Azure subscription. Once you obtain it, create a [Language resource](https://learn.microsoft.com/en-us/azure/ai-services/language-service/language-detection/quickstart?tabs=windows&pivots=programming-language-csharp#create-an-azure-resource) and a [Translator resource](https://learn.microsoft.com/en-us/azure/ai-services/translator/create-translator-resource) (or a single [multi-service resource](https://learn.microsoft.com/en-us/azure/ai-services/multi-service-resource?tabs=windows&pivots=azportal)) in the Azure portal to get your keys and endpoints for client authentication.
20-
21-
`OpenAIController` includes endpoints to generate image, chart and hyperlink descriptions. The `OpenAIClientImageHelper` class sends a request to describe an image and obtains a string with a response. The `OpenAIClientHyperlinkHelper` class sends a request to describe an hyperlink and obtains a string with a response. The `OpenAIClientImageHelper.DescribeImageAsync` and `OpenAIClientHyperlinkHelper.DescribeHyperlinkAsync` methods are executed within the corresponding endpoints.
22-
For Excel files, charts are converted to images to obtain relevant descriptions.
23-
24-
`LanguageController` includes the endpoint to detect the language for text paragraphs and generate paragraph transaltions. The `AzureAILanguageHelper` class sends a request to detect the language of the specified text and returns the language name in the "ISO 693-1" format. The `AzureAITranslationHelper` class sends a request to translate the given text to the specified language and returns the transaled text string. The `AzureAILanguageHelper.DetectTextLanguage` and `AzureAITranslationHelper.TranslateText` methods are executed in the `GenerateLanguageSettingsForParagraphs` endpoint.
25-
26-
## Files to Review
27-
28-
* [OpenAIController.cs](./CS/Controllers/OpenAIController.cs)
29-
* [LanguageController.cs](./CS/Controllers/LanguageController.cs)
30-
* [OpenAIClientImageHelper.cs](./CS/BusinessObjects/OpenAIClientImageHelper.cs)
31-
* [OpenAIClientHyperlinkHelper.cs](./CS/BusinessObjects/OpenAIClientHyperlinkHelper.cs)
32-
* [AzureAILanguageHelper.cs](./CS/BusinessObjects/AzureAILanguageHelper.cs)
33-
* [AzureAITranslationHelper.cs](./CS/BusinessObjects/AzureAITranslationHelper.cs)
34-
* [Helpers.cs](./CS/BusinessObjects/Helpers.cs)
35-
36-
## Documentation
37-
38-
* [Office File API — Enhance Accessibility in Office Documents (Word & Excel) using OpenAI Models](https://community.devexpress.com/blogs/office/archive/2024/05/08/enhance-accessibility-in-office-documents-word-and-excel-using-artificial-intelligence-system.aspx)
39-
* [Office File API — Enhance Accessibility in Office Documents using OpenAI Models (Part 2)](https://community.devexpress.com/blogs/office/archive/2024/06/03/office-file-api-enhance-accessibility-in-office-documents-word-amp-excel-using-openai-models-part-2.aspx)
40-
<!-- feedback -->
41-
## Does this example address your development requirements/objectives?
42-
43-
[<img src="https://www.devexpress.com/support/examples/i/yes-button.svg"/>](https://www.devexpress.com/support/examples/survey.xml?utm_source=github&utm_campaign=office-file-api-ai-implementation&~~~was_helpful=yes) [<img src="https://www.devexpress.com/support/examples/i/no-button.svg"/>](https://www.devexpress.com/support/examples/survey.xml?utm_source=github&utm_campaign=office-file-api-ai-implementation&~~~was_helpful=no)
44-
45-
(you will be redirected to DevExpress.com to submit your response)
46-
<!-- feedback end -->
1+
<!-- default badges list -->
2+
![](https://img.shields.io/endpoint?url=https://codecentral.devexpress.com/api/v1/VersionRange/794940392/23.2.5%2B)
3+
[![](https://img.shields.io/badge/Open_in_DevExpress_Support_Center-FF7200?style=flat-square&logo=DevExpress&logoColor=white)](https://supportcenter.devexpress.com/ticket/details/T1231021)
4+
[![](https://img.shields.io/badge/📖_How_to_use_DevExpress_Examples-e9f6fc?style=flat-square)](https://docs.devexpress.com/GeneralInformation/403183)
5+
[![](https://img.shields.io/badge/💬_Leave_Feedback-feecdd?style=flat-square)](#does-this-example-address-your-development-requirementsobjectives)
6+
<!-- default badges end -->
7+
# Office File API – Integrate AI
8+
9+
The following project integrates AI capabilities into a DevExpress-powered Office File API Web API application. This project uses the following AI services:
10+
* OpenAI API generates descriptions for images, charts and hyperlinks in Microsoft Word and Excel files.
11+
* Azure AI Language API detects the language for text paragraphs in Word files.
12+
* Azure AI Translator API translates paragraph text to the chosen language in Word files.
13+
14+
> [!note]
15+
> Before you incorporate this solution in your app, please be sure to read and understand terms and conditions of using AI services.
16+
17+
## Implementation Details
18+
19+
The project uses the [Azure.AI.OpenAI](https://www.nuget.org/packages/Azure.AI.OpenAI/), [Azure.AI.TextAnalytics](https://www.nuget.org/packages/Azure.AI.TextAnalytics) and [Azure.AI.Translation.Text](https://www.nuget.org/packages/Azure.AI.Translation.Text) NuGet packages. Azure.AI.OpenAI adapts OpenAI's REST APIs for use in non-Azure OpenAI development. Azure.AI.TextAnalytics and Azure.AI.Translation.Text require an Azure subscription. Once you obtain it, create a [Language resource](https://learn.microsoft.com/en-us/azure/ai-services/language-service/language-detection/quickstart?tabs=windows&pivots=programming-language-csharp#create-an-azure-resource) and a [Translator resource](https://learn.microsoft.com/en-us/azure/ai-services/translator/create-translator-resource) (or a single [multi-service resource](https://learn.microsoft.com/en-us/azure/ai-services/multi-service-resource?tabs=windows&pivots=azportal)) in the Azure portal to get your keys and endpoints for client authentication.
20+
21+
`OpenAIController` includes endpoints to generate image, chart and hyperlink descriptions. The `OpenAIClientImageHelper` class sends a request to describe an image and obtains a string with a response. The `OpenAIClientHyperlinkHelper` class sends a request to describe an hyperlink and obtains a string with a response. The `OpenAIClientImageHelper.DescribeImageAsync` and `OpenAIClientHyperlinkHelper.DescribeHyperlinkAsync` methods are executed within the corresponding endpoints.
22+
For Excel files, charts are converted to images to obtain relevant descriptions.
23+
24+
`LanguageController` includes the endpoint to detect the language for text paragraphs and generate paragraph transaltions. The `AzureAILanguageHelper` class sends a request to detect the language of the specified text and returns the language name in the "ISO 693-1" format. The `AzureAITranslationHelper` class sends a request to translate the given text to the specified language and returns the transaled text string. The `AzureAILanguageHelper.DetectTextLanguage` and `AzureAITranslationHelper.TranslateText` methods are executed in the `GenerateLanguageSettingsForParagraphs` endpoint.
25+
26+
## Files to Review
27+
28+
* [OpenAIController.cs](./CS/Controllers/OpenAIController.cs)
29+
* [LanguageController.cs](./CS/Controllers/LanguageController.cs)
30+
* [OpenAIClientImageHelper.cs](./CS/BusinessObjects/OpenAIClientImageHelper.cs)
31+
* [OpenAIClientHyperlinkHelper.cs](./CS/BusinessObjects/OpenAIClientHyperlinkHelper.cs)
32+
* [AzureAILanguageHelper.cs](./CS/BusinessObjects/AzureAILanguageHelper.cs)
33+
* [AzureAITranslationHelper.cs](./CS/BusinessObjects/AzureAITranslationHelper.cs)
34+
* [Helpers.cs](./CS/BusinessObjects/Helpers.cs)
35+
36+
## Documentation
37+
38+
* [Office File API — Enhance Accessibility in Office Documents (Word & Excel) using OpenAI Models](https://community.devexpress.com/blogs/office/archive/2024/05/08/enhance-accessibility-in-office-documents-word-and-excel-using-artificial-intelligence-system.aspx)
39+
* [Office File API — Enhance Accessibility in Office Documents using OpenAI Models (Part 2)](https://community.devexpress.com/blogs/office/archive/2024/06/03/office-file-api-enhance-accessibility-in-office-documents-word-amp-excel-using-openai-models-part-2.aspx)
40+
<!-- feedback -->
41+
## Does this example address your development requirements/objectives?
42+
43+
[<img src="https://www.devexpress.com/support/examples/i/yes-button.svg"/>](https://www.devexpress.com/support/examples/survey.xml?utm_source=github&utm_campaign=office-file-api-ai-implementation&~~~was_helpful=yes) [<img src="https://www.devexpress.com/support/examples/i/no-button.svg"/>](https://www.devexpress.com/support/examples/survey.xml?utm_source=github&utm_campaign=office-file-api-ai-implementation&~~~was_helpful=no)
44+
45+
(you will be redirected to DevExpress.com to submit your response)
46+
<!-- feedback end -->

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /