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 b380243

Browse files
authored
Update README.md
1 parent b574305 commit b380243

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

‎README.md

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,36 @@
33
[![](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)
44
[![](https://img.shields.io/badge/📖_How_to_use_DevExpress_Examples-e9f6fc?style=flat-square)](https://docs.devexpress.com/GeneralInformation/403183)
55
<!-- default badges end -->
6-
# Office File API – Integrate AI to Generate Accessible Descriptions
6+
# Office File API – Integrate AI
77

8-
The following project integrates AI capabilities into a DevExpress-powered Office File API Web API application. OpenAI API is used to generate descriptions for images, charts and hyperlinks in Microsoft Word and Excel files.
8+
The following project integrates AI capabilities into a DevExpress-powered Office File API Web API application. This project uses the following AI services:
9+
* OpenAI API generates descriptions for images, charts and hyperlinks in Microsoft Word and Excel files.
10+
* Azure AI Language API detects the language for text paragraphs in Word files.
11+
* Azure AI Translator API translates paragraph text to the chosen language in Word files.
912

1013
> [!note]
11-
> Before you incorporate this solution in your app, please be sure to read and understand OpenAI's license agreement and terms of use.
14+
> Before you incorporate this solution in your app, please be sure to read and understand terms and conditions of using AI services.
1215
1316
## Implementation Details
1417

15-
The project uses the [Azure.AI.OpenAI](https://www.nuget.org/packages/Azure.AI.OpenAI/) package which adapts OpenAI's REST APIs so it can be used in non-Azure OpenAI development.
18+
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://portal.azure.com/#create/Microsoft.CognitiveServicesTextAnalytics) and a [Translator resource](https://portal.azure.com/#create/Microsoft.CognitiveServicesTextTranslation) (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 authentification.
1619

17-
The `OpenAIClientImageHelper` class sends a request to describe an image and obtain a string with a response. The `OpenAIClientHyperlinkHelper` class sends a request to describe an hyperlink and obtain a string with a response. The `OpenAIClientImageHelper.DescribeImageAsync` and `OpenAIClientHyperlinkHelper.DescribeHyperlinkAsync` methods are executed within corresponding endpoints.
20+
`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.
21+
For Excel files, charts are converted to images to obtain relevant descriptions.
1822

19-
For Excel files, charts are converted to images to obtain a relevant description.
23+
`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.
2024

2125
## Files to Review
2226

2327
* [OpenAIController.cs](./CS/Controllers/OpenAIController.cs)
28+
* [LanguageController.cs](./CS/Controllers/LanguageController.cs)
2429
* [OpenAIClientImageHelper.cs](./CS/BusinessObjects/OpenAIClientImageHelper.cs)
2530
* [OpenAIClientHyperlinkHelper.cs](./CS/BusinessObjects/OpenAIClientHyperlinkHelper.cs)
31+
* [AzureAILanguageHelper.cs](./CS/BusinessObjects/AzureAILanguageHelper.cs)
32+
* [AzureAITranslationHelper.cs](./CS/BusinessObjects/AzureAITranslationHelper.cs)
2633
* [Helpers.cs](./CS/BusinessObjects/Helpers.cs)
2734

2835
## Documentation
2936

3037
* [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)
38+
* [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)

0 commit comments

Comments
(0)

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