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

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

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

Take seamlessly advantage of different AI LLM's from your Delphi apps

Sascha

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



We are thrilled to announce the release of the new TTMSFNCCloudAI component, available in the

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

for Delphi developers. This new addition empowers Delphi developers to seamlessly integrate and interact with Large Language Models (LLMs) in their applications, all while leveraging the power and flexibility of the FNC to power VCL Windows, FMX cross-platform and TMS WEB Core web apps.

Supported LLMs


The TTMSFNCCloudAI component supports a variety of state-of-the-art LLMs, including:

What is TTMSFNCCloudAI?


The TTMSFNCCloudAI component enables you to:

  • Send prompts to your chosen LLM.
  • Retrieve and process responses seamlessly.
  • Customize model settings such as temperature, model type, and other parameters.
  • Handle advanced conversation features, such as setting user and system roles.

Its intuitive design simplifies the process of embedding LLM capabilities into Delphi-based applications, whether you are building chatbots, summarization tools, code generators, or anything in between.



How Does It Work?


The component provides a unified API to interact with different LLMs. Developers can configure API keys, select the desired model, set parameters, and handle responses through well-defined events. 100% identical code can be used to work with different LLM's. There is only one property to change to select another LLM.


Here’s a basic example of how to use TTMSFNCCloudAI:

procedure TForm1.BtnExecuteClick(Sender: TObject);
begin
TMSFNCCloudAI1.Service := aiOpenAI; // Select OpenAI service
TMSFNCCloudAI1.APIKeys.OpenAI := 'your_openai_api_key';
TMSFNCCloudAI1.Settings.OpenAIModel := 'gpt-4';
TMSFNCCloudAI1.Context.Text := 'What are the key benefits of using TMS FNC Cloud AI?';
TMSFNCCloudAI1.OnExecuted := DoAIResponse;
TMSFNCCloudAI1.Execute;
end;

procedure TForm1.DoAIResponse(Sender: TObject; AResponse: TTMSFNCCloudAIResponse; AHttpStatusCode: Integer; AHttpResult: string);
begin
if AHttpStatusCode = 200 then
ShowMessage('AI Response: ' + AResponse.Content.Text)
else
ShowMessage('Error: ' + AHttpResult);
end;


Some examples


Here are some examples on how we used the different LLMs for different tasks, going from writing Object Pascal code, producing HTML/CSS pages to translating a poem from English to German.

Delphi code generation

The classic example. Use the system & assistant role to specify that you want Object Pascal code to be returned and the prompt describes what the code should do:

TMS Software Delphi  Components


Web pages (HTML/CSS) generation

Another classc.

TMS Software Delphi  Components


Result:

TMS Software Delphi  Components


Translation

In this example, we ask the LLM to translate a poem from English to German and of course, we expect the resulting translated text to rhyme as well

TMS Software Delphi  Components




Future Extensions


The TTMSFNCCloudAI component is just the beginning. In upcoming updates, we plan to introduce:

  1. Real-time Streaming Responses: Ideal for chat applications and progress monitoring.
  2. Integration with More AI Services: Expanding support for new and emerging AI platforms.
  3. Fine-tuning Models: Enable fine-tuning for domain-specific tasks.
  4. Enhanced Analytics: Token usage tracking, cost estimation, and response optimization tools.
  5. Your ideas: Let us know what your wild ideas are to leverage the power of AI in your Delphi apps?
Get Started Today!


Don’t miss the opportunity to elevate your Delphi applications with the power of AI. With TTMSFNCCloudAI, integrating LLM capabilities has never been easier.


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



Empower your applications with the intelligence of the future – all from the comfort of your Delphi IDE!


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

 
Вверх