• Что бы вступить в ряды "Принятый кодер" Вам нужно:
    Написать 10 полезных сообщений или тем и Получить 10 симпатий.
    Для того кто не хочет терять время,может пожертвовать средства для поддержки сервеса, и вступить в ряды VIP на месяц, дополнительная информация в лс.

  • Пользаватели которые будут спамить, уходят в бан без предупреждения. Спам сообщения определяется администрацией и модератором.

  • Гость, Что бы Вы хотели увидеть на нашем Форуме? Изложить свои идеи и пожелания по улучшению форума Вы можете поделиться с нами здесь. ----> Перейдите сюда
  • Все пользователи не прошедшие проверку электронной почты будут заблокированы. Все вопросы с разблокировкой обращайтесь по адресу электронной почте : info@guardianelinks.com . Не пришло сообщение о проверке или о сбросе также сообщите нам.

Add AI superpower to your Delphi & C++Builder apps part 1

Sascha Оффлайн

Sascha

Заместитель Администратора
Команда форума
Администратор
Регистрация
9 Май 2015
Сообщения
1,483
Баллы
155
TMS Software Delphi  Components

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

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

'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:


  1. Send text input ("prompt")


  2. 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:
TMS Software Delphi  Components


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:


  1. Request an API key from the LLM provider (e.g., OpenAI, Anthropic).


  2. Select your model (e.g., gpt-4, claude-3-7-sonnet, mistral-medium).


  3. Set the prompt context, and optionally the system role (instructions for the models behavior).


  4. Send the request via HTTPS POST.


  5. 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 ?:

TMS Software Delphi  Components


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

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

license, you can now get also access to the first test version of

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

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

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

.


Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.





Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.


Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.





Источник:

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

 
Вверх Снизу