Blog
All Blog Posts | Next Post | Previous Post
Add AI superpower to your Delphi & C++Builder apps part 1
Today

Image generated by OpenAI
Many software developers view AI primarily as a tool to boost productivity and improve their software development skills. But theres another powerful angle: using AI to enhance and extend the functionality of the applications we build. Thats exactly what weve been exploring over the past yearspecifically from the perspective of Delphi and C++Builder developers. In this blog series, well walk you through, step by step, the tools and techniques weve already developed for you to leverage. At the same time, we hope to spark a lively discussion and inspire new ideas about how AI can help us build software with functionality that feels out of this world. In this first article, well start with a small but essential step: how to use LLMs from within your applications. In the next part, well dive into LLM function calling and how it can enable deep integrations with your apps.
Integrating LLMs via REST API with TMS FNC Cloud Pack's TTMSFNCCloudAI
Component
The surge in Large Language Models (LLMs) such as ChatGPT, Claude, Mistral, and others has revolutionized how applications interact with language. Whether you want to translate content, summarize data, or build intelligent assistants, these models provide a consistent and scalable interface through REST APIs.
In this article, well explore how you can abstractly and efficiently work with a wide range of LLM serviceslike OpenAI, DeepSeek, Claude, Gemini, Perplexity, Grok, Ollama, Mistral using the powerful TTMSFNCCloudAI
component from TMS FNC Cloud Pack.
A Unified Approach to LLM Integration
Each cloud LLM provider offers slightly different API semantics, authentication methods, and payload structures. However, at a higher level, their interfaces boil down to a simple pattern:
-
Send text input ("prompt")
-
Receive generated text response ("completion")
This is commonly referred to as the Completion REST API.
With TTMSFNCCloudAI
, you dont need to worry about low-level details. The component abstracts away REST communication, authentication, and request building, so you can focus purely on integrating language capabilities into your app.
Supported AI services include at this moment:
OpenAI (ChatGPT)
Leading AI research and deployment company, creator of GPT-4 and ChatGPT.-
Gemini (Google AI)
Google's flagship multimodal AI family developed by Google DeepMind. -
Claude (Anthropic)
Anthropics family of helpful, harmless, and honest AI assistants. -
Grok (xAI)
AI developed by Elon Musks xAI, integrated with X (formerly Twitter). -
DeepSeek
Open-source and commercial LLMs focused on code and reasoning tasks. -
Mistral
European AI company offering open-weight LLMs like Mistral and Mixtral. -
Ollama
A local runtime for running LLMs on your own machine with a simple CLI. -
Perplexity AI
An AI-powered answer engine combining web search and conversational AI.
Common Use Cases
You can use these models for a variety of natural language processing tasks:
-
Translation between languages
-
Summarization of documents or datasets
-
Information retrieval from user input
-
Conversational agents and chatbots
-
And much more you'll uncover in the next article on function calling!
All these use cases follow the same underlying pattern: send context → receive a response. This makes them perfect candidates for abstraction.
Step-by-Step Integration Workflow
The typical workflow using the TTMSFNCCloudAI
component looks like this:
-
Request an API key from the LLM provider (e.g., OpenAI, Anthropic).
-
Select your model (e.g.,
gpt-4
,claude-3-7-sonnet
,mistral-medium
). -
Set the prompt context, and optionally the system role (instructions for the models behavior).
-
Send the request via HTTPS POST.
-
Receive and process the generated response text.
All of this is encapsulated cleanly by the component, making it straightforward to switch between providers or models.
Code Example: Ask Claude About Development Tools
Here's a practical example of how to call Anthropic's Claude model using TTMSFNCCloudAI
in a Delphi or C++Builder application:
Once Execute
is called, the request is sent, and the response text will be available via the result event or property for further use in your application.
And of course it is reassuring to see that the LLM responds with Delphi as its first recommendation 😉:
Why Use TTMSFNCCloudAI
?
- Rapid Development: Eliminate the boilerplate of REST clients and JSON handling.
- Flexibility: Switch between LLM providers without rewriting logic.
- RAD Integration: Seamlessly integrates into the Delphi or C++Builder apps built for Windows, macOS, Linux, iOS, Android.
- Cross-platform: Build once, deploy anywhere.
Get started
As LLMs become increasingly critical in building intelligent applications, having a robust and unified abstraction like TTMSFNCCloudAI
allows you to stay focused on the logic and user experiencenot the plumbing.
In upcoming articles, well dive deeper into function calling, RAG, agents, MCP servers & clients.
If you have an active TMS ALL-ACCESS license, you can now get also access to the first test version of TMS AI Studio that uses the TTMSFNCCloudAI
component but also has everything on board to let you build MCP servers and clients.
Register now to participate in this testing via this landing page.
Bruno Fierens

This blog post has not received any comments yet.
All Blog Posts | Next Post | Previous Post