SmartCore AI Components v1.1
Download SmartCore AI Components v1.1
Starting with version 13.0, RAD Studio continues to provide AI-powered coding assistance in the IDE by introducing a new set of core AI components designed to help customers add AI features to their existing applications or build brand-new AI-focused applications with Delphi or C++Builder.
This is a modular component suite to simplify calling AI providers (OpenAI, Claude, Gemini, Ollama) from Delphi and C++Builder applications. It separates runtime units (components, drivers, types, LiveBindings) from design-time units (property editors, connection wizard, helpers). Drivers can be extended by overriding virtual methods or creating new driver components.
Overview
The SmartCore AI Components feature is a building block and a foundation for the future. It’s a core architecture that our customers and third-party vendors can build on and extend to integrate with additional AI engines and UI controls.
This package includes:
A new AI connection component (with a role similar to that of a database connection in FireDAC). This is an AI-engine agnostic component, which uses specific drivers to communicate via REST with different AI engines (including OpenAI, Claude, Gemini, and Ollama). The SmartCore AI engine provides the ability to add additional drivers, enabling AI providers to expand the capabilities of your project as the market evolves. The configuration is managed via an easy-to-use AI connection wizard.
A set of AI request components for different data types (like text, images, structured data), which can be associated with prompts and can be bound directly with UI controls to display the results.
With the SmartCore AI Components Pack, users can integrate AI into both existing and new applications, addressing many popular AI use cases, such as providing support for in-product content creation like generating images and other media, adding in-product localization support for on-the-fly translation, delivering in-app smart insights and personalized recommendations for data analysis, or building an in-app chatbot to add interactivity to an existing application.
Components and Drivers Quick Reference
The following is a list of the components and drivers.
TAIConnection: owns and links a concrete TAIDriver.
Drivers: TAIOpenAIDriver, TAIClaudeDriver, TAIGeminiDriver, TAIOllamaDriver.
Params: strongly-typed per driver (TAIOpenAIParams, TAIClaudeParams, TAIGeminiParams, TAIOllamaParams)
Endpoint_*: drivers publish provider-specific endpoints with correct default values (based on the provider API references).
Request components: TAIChatRequest, TAIImageRequest, TAIJSONRequest, TAIStreamRequest
Notes and Best Practices
The following section lists best practices and notes.
Use the Connection Wizard at design-time for simplicity.
Drivers raise the EAIException, EAIJSONException, EAIXxxxException exceptions for error handling.
Drivers can do operations without a connection as well, but TAIXxxxRequest components are dependent on TAIConnection.
Injecting an Http Customizer is possible at the TAIConnection level, in case you need more customized HTTP client behavior.
Drivers can do operations without a connection as well, but AIRequest components are dependent on AIConnection.
The Synchronize events property is True by default, but in case of having many async in-flight requests, use Driver.CancelALL and wait and check Driver.IsRunning before destroying components, otherwise there could be unexpected exceptions or errors.
