Skip to content

Integrate AI capabilities into a DevExpress-powered Office File API Web API application.

License

Notifications You must be signed in to change notification settings

DevExpress-Examples/office-file-api-ai-implementation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Office File API – Integrate AI to Generate Accessible Descriptions

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.

Note

Before you incorporate this solution in your app, please be sure to read and understand OpenAI's license agreement and terms of use.

Implementation Details

The project uses the Azure.AI.OpenAI package which adapts OpenAI's REST APIs so it can be used in non-Azure OpenAI development.

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.

For Excel files, charts are converted to images to obtain a relevant description.

Files to Review

Documentation