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

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Office File API – Integrate DevExpress AI-powered Extensions

This project integrates AI capabilities into a Web application that handles user documents. DevExpress Office File API and DevExpress AI-powered Extensions work together to implement the following functionality:

  • Generate descriptions for images, charts, and hyperlinks in office files (Word and Excel).
  • Summarize, translate, and proofread office files (Word, PDF, and PowerPoint).

Note

DevExpress does not offer a REST API or ship any built-in LLMs/SLMs. Instead, we follow the BYOL ("bring your own license") principle. To use these features, you need to have an active subscription to AI services (e.g., Azure, Open AI, Google Gemini, Mistral AI, etc.) and obtain the REST API endpoint, key, and model deployment name. These variables must be specified at runtime to enable DevExpress AI-powered Extensions in your application.

Implementation Details

DevExpress AI-powered extensions run inside an AIExtensionsContainerDefault container that manages registered AI clients.

The IChatClient interface serves as the central mechanism for language model interaction. The AddDevExpressAIConsole method registers a chat client in the application.

The RegisterAIDocProcessingService(AIExtensionsContainerSettings) method registers document-processing AI extensions in a dependency injection container.

The table below lists controllers that use DevExpress AI-powered extensions and corresponding registration methods.

Controller Description API
AccessibilityController Endpoints that generate image, chart, and hyperlink descriptions. In Excel files, charts are converted to images to obtain relevant descriptions. GenerateImageDescriptionAsync, CustomPromptAsync
SummarizeController Endpoints that produce a concise summary for an entire document/presentation or selected parts (slides, pages, sections). SummarizeAsync
ProofreadController Endpoints that review grammar, spelling, and style in an entire document/presentation or selected parts (slides, pages, sections). ProofreadAsync
TranslateController Endpoints that translate a document/presentation or its selected parts (slides, pages, sections). TranslateAsync

Files to Review

Documentation

Does this example address your development requirements/objectives?

(you will be redirected to DevExpress.com to submit your response)

About

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

Topics

Resources

License

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •