Skip to content

Latest commit

 

History

History
59 lines (42 loc) · 3.82 KB

File metadata and controls

59 lines (42 loc) · 3.82 KB

DevExpress VCL - Integrate SmartCore AI Component Library

This example integrates an AI agent into DevExpress VCL Controls using the official Embarcadero SmartCore AI Components pack available via the GetIt Package Manager. VCL developers can switch between different AI providers and execute commands that DevExpress AI Assistant adds to DevExpress Text Editors (such as TcxMemo or TdxRichEditControl).

DevExpress VCL AI Example

Note

VCL developers can use either SmartCore AI Components, plug in third-party libraries, or leverage own implementation to support different AI providers. For example, the DevExpress VCL Rich Text Editor demo ("%Public%\DevExpress VCL Demos\MegaDemos\Product Demos\ExpressRichEditControl\dxAI.ChatClient.Azure.pas" uses our Azure OpenAI service deployment via a simple TdxAIAzureChatClient implementation (extends our base TdxAIChatClient API).

Prerequisites

  • Microsoft Windows 10 or newer
  • Embarcadero RAD Studio IDE 13.0 or newer (Community Edition is not supported)
  • The SmartCore AI Components package installed from GetIt
  • DevExpress VCL Components v25.1.3 or newer

Run the Example

To connect to an AI provider within this sample project, you must:

  1. Open the main form in Designer mode.
  2. Select the OpenAI or Google Gemini provider component.
  3. Expand the Params node in the Object Inspector and paste a valid API key into the APIKey input box.
  4. Uncomment the TdxSmartCoreAIChatClient.Create call for the target AI provider:
procedure TSmartCoreAIDemoMainForm.FormCreate(Sender: TObject);
var
  Client: TdxAIChatClient;
begin
  // OpenAI
  // Client := TdxSmartCoreAIChatClient.Create(OpenAIDriver);

  // Google Gemini
  // Client := TdxSmartCoreAIChatClient.Create(GeminiDriver);

  TdxAIChatClients.AddChatClient(Client);
end;

Note

DevExpress AI-powered Extensions follow the "bring your own key" principle. DevExpress does not offer a REST API and does not ship any built-in LLMs/SLMs. You need an active subscription for the required AI service to obtain the REST API endpoint, key, and model deployment name. These variables must be specified at application startup to register AI clients and enable DevExpress AI-powered Extensions in your application.

Does This Example Address Your Development Requirements/Objectives?

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