|
| 1 | +# Office File API – Integrate AI to Generate Accessible Descriptions |
| 2 | + |
| 3 | +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 in Microsoft Word files and for Excel charts. |
| 4 | + |
| 5 | +## Implementation Details |
| 6 | + |
| 7 | +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. |
| 8 | + |
| 9 | +The `OpenAIClientImageHelper` class sends a request to describe an image and obtain a string with a response. The `OpenAIClientImageHelper` class methods are executed within corresponding endpoints. |
| 10 | + |
| 11 | +For Excel files, charts are converted to images to obtain a relevant description. |
| 12 | + |
| 13 | +## Files to Review |
| 14 | + |
| 15 | +* [OpenAIController.cs](./CS/Controllers/OpenAIController.cs) |
| 16 | +* [OpenAIClientImageHelper.cs](./CS/BusinessObjects/OpenAIClientImageHelper.cs) |
| 17 | +* [Helpers.cs](./CS/BusinessObjects/Helpers.cs) |
| 18 | + |
| 19 | +## Documentation |
| 20 | + |
| 21 | +* [Office File API — Enhance Accessibility in Office Documents (Word & Excel) using OpenAI Models](https://community.devexpress.com/blogs/office/archive/2024/04/18/enhance-accessibility-in-office-documents-word-amp-excel-using-artificial-intelligence-system.aspx) |
0 commit comments