Recent

Author Topic: TCHATGPT — An Artificial Intelligence Component Package for Lazarus / Free Pasca  (Read 889 times)

marcelomaurinmartins@gmai

  • New Member
  • *
  • Posts: 24
Hello Lazarus community,

I would like to introduce my open source project:

https://github.com/marcelomaurin/CHATGPT/

TCHATGPT is an Artificial Intelligence component package for Lazarus / Free Pascal, created to bring modern AI resources closer to traditional component-based Lazarus development.

The purpose of the project is to allow Lazarus applications to integrate AI in a practical way, using both external resources and local features.

Today the project already integrates Python with Lazarus and allows the use of several libraries and technologies related to AI, computer vision, image processing, voice, automation, local models and LLM services.

Besides Python integration, the project is also evolving with native Free Pascal resources, aiming to reduce external dependencies in some areas and create its own components for classification, pipeline organization, document generation, automation and local system integration.

The main areas being integrated and developed are:

LLMs and AI APIs
Local models
Python integration with Lazarus
Computer vision
Image processing
Voice and audio
Document generation
Graphs and local classification
AI agents
Automation, IoT and industrial systems
Native Free Pascal resources

The project is still under active development, with functional components, examples, beta areas and experimental modules. The idea is to build a modular suite where developers can install and use only the resources required by each application.

The documentation is also being prepared with translations into several languages, including Portuguese, English, Spanish, French, Italian, Arabic, Chinese, Russian and Japanese, making the project more accessible to the international community.

The goal of TCHATGPT is to show that Lazarus / Free Pascal remains a viable platform for modern applications, including Artificial Intelligence, automation, computer vision and integration with local or cloud-based models.

Feedback, testing, suggestions and contributions are very welcome.

Repository:

https://github.com/marcelomaurin/CHATGPT/


Dzandaa

  • Hero Member
  • *****
  • Posts: 557
  • From C# to Lazarus
Hi,

@marcelomaurinmartins:

I don't think introducing GPT chat into Pascal Lazarus is a good idea.

It's better to use your brain rather than a tool that isn't always reliable. See the article in "The Harvard Gazette".

https://news.harvard.edu/gazette/story/2025/11/is-ai-dulling-our-minds/

AI is trained on data provided by humans; it has a learning curve. If you give it incorrect data and tell it's true, the result is that in testing, if you input incorrect data, the AI ​​will accept it as true. Using chatbots to create a program is easy, but our brains don't train, and in the long run, this risks introducing a deficiency (laziness) in our brains.

And in the future, we won't need programmers anymore, just technicians.

Just my opinion; my wife works on programming neural networks :)

B->
Regards,
Dzandaa

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 12517
  • Debugger - SynEdit - and more
    • wiki
Please be reminded of https://forum.lazarus.freepascal.org/index.php/topic,73827.0.html

This thread is about introducing a package. It can be discussed how it can be efficiently used, what it provides, and ideas how to improve it.

This thread should not be turned into a general discussion about should AI be used at all.
That would not be a Pascal related topic, but rather a huge field of its own, which would way exceed the boundaries of this forum. For general, non Pascal related AI versus no-AI we recommand finding a forum that specializes on that question.

Thanks for understanding.



Welcome to marcelomaurinmartins

marcelomaurinmartins@gmai

  • New Member
  • *
  • Posts: 24
Here's the list of components in development.
They are at different stages of maturity.

I ask that you check the links and especially the screenshots, as they help to conceptualize the project.

https://github.com/marcelomaurin/CHATGPT/tree/main/screenshots

https://github.com/marcelomaurin/CHATGPT/tree/main/pacote

Weiss

  • Full Member
  • ***
  • Posts: 248
Hello Lazarus community,

I would like to introduce my open source project:

https://github.com/marcelomaurin/CHATGPT/
..
The purpose of the project is to allow Lazarus applications to integrate AI in a practical way, using both external resources and local features.
..

The documentation is also being prepared with translations into several languages, .., English,..

The goal of TCHATGPT is to show that Lazarus / Free Pascal remains a viable platform for modern applications, including Artificial Intelligence, automation, computer vision and integration with local or cloud-based models.

Feedback, testing, suggestions and contributions are very welcome.

Repository:

https://github.com/marcelomaurin/CHATGPT/

A link to documentation would be breat. Is it something like local LLM which can be integrated into application? Can it be trained on a specific engineering tasks? I opened your git and instantly got lost, there is so much in there. From what you are saying, it sounds good, something I kept thinking about

marcelomaurinmartins@gmai

  • New Member
  • *
  • Posts: 24
Actually, it's not an LLM; it's a set of components for building AI applications. For example, I'm currently writing a module for creating a data dictionary, which can be used in conjunction with an LLM to create dynamic reports in the application. In other words, using two components, `AI_dictionary_base` creates a data dictionary, and with the `chatgpt` component, you can create the data structure so the user can specify what needs to be related. The bot then dynamically performs the SQL query. This is just one example of use. But there are other components that can be integrated in different ways. In fact, my project isn't a solution; it's more of a toolbox for building applications. I hope my explanation was clear.

Hello Lazarus community,

I would like to introduce my open source project:

https://github.com/marcelomaurin/CHATGPT/
..
The purpose of the project is to allow Lazarus applications to integrate AI in a practical way, using both external resources and local features.
..

The documentation is also being prepared with translations into several languages, .., English,..

The goal of TCHATGPT is to show that Lazarus / Free Pascal remains a viable platform for modern applications, including Artificial Intelligence, automation, computer vision and integration with local or cloud-based models.

Feedback, testing, suggestions and contributions are very welcome.

Repository:

https://github.com/marcelomaurin/CHATGPT/

A link to documentation would be breat. Is it something like local LLM which can be integrated into application? Can it be trained on a specific engineering tasks? I opened your git and instantly got lost, there is so much in there. From what you are saying, it sounds good, something I kept thinking about
« Last Edit: June 20, 2026, 01:55:31 pm by marcelomaurinmartins@gmai »

marcelomaurinmartins@gmai

  • New Member
  • *
  • Posts: 24
Another important example is the Python communication component.

We all know that Python is a very powerful language, with a huge ecosystem of libraries and integrations. With this in mind, I developed a Lazarus component that allows Pascal applications to integrate with Python in a simple and practical way.

In addition to connecting the application to the Python interpreter, the component can also work with its own runtime environment, allowing the required Python packages to be distributed together with the application. This makes it possible to create a complete installer containing everything the application needs to run, without requiring additional installations or manual configuration on the user’s computer.

The main idea is to simplify distribution: the setup installs the application, the Python runtime, and all required dependencies, leaving the environment ready to use.

With this approach, it becomes possible to develop applications in Lazarus while also taking advantage of Python’s advanced capabilities, greatly reducing the challenges related to dependency distribution.

So far, I have tested the component on Windows. To be fully transparent, it still needs to be validated on Linux, but Linux compatibility is part of the project’s goal.


Hello Lazarus community,

I would like to introduce my open source project:

https://github.com/marcelomaurin/CHATGPT/
..
The purpose of the project is to allow Lazarus applications to integrate AI in a practical way, using both external resources and local features.
..

The documentation is also being prepared with translations into several languages, .., English,..

The goal of TCHATGPT is to show that Lazarus / Free Pascal remains a viable platform for modern applications, including Artificial Intelligence, automation, computer vision and integration with local or cloud-based models.

Feedback, testing, suggestions and contributions are very welcome.

Repository:

https://github.com/marcelomaurin/CHATGPT/

A link to documentation would be breat. Is it something like local LLM which can be integrated into application? Can it be trained on a specific engineering tasks? I opened your git and instantly got lost, there is so much in there. From what you are saying, it sounds good, something I kept thinking about

marcelomaurinmartins@gmai

  • New Member
  • *
  • Posts: 24
Yes, it is possible to redistribute Python together with your own application.

The official Python license, maintained by the Python Software Foundation, allows the use, copying, modification, and redistribution of Python in source code or binary form. This means an application can include an embedded Python runtime with its files, making installation easier and avoiding the need for the end user to manually install dependencies.

This model is especially useful for desktop applications, such as projects developed with Lazarus, Delphi, or other languages, where Python can be used as an automation engine, data processing layer, AI integration, scientific library interface, or internal script execution environment.

The main precaution is to keep the Python license files included with the application and also verify the licenses of any additional Python packages distributed with it, such as NumPy, OpenCV, TensorFlow, Pillow, Requests, or other modules.

Official reference:
https://docs.python.org/3/license.html

There is also a clear confirmation on the official Python website stating that Python is free even for commercial use, including resale, without copyleft restrictions:
https://www.python.org/doc/copyright/ 

Another important example is the Python communication component.

We all know that Python is a very powerful language, with a huge ecosystem of libraries and integrations. With this in mind, I developed a Lazarus component that allows Pascal applications to integrate with Python in a simple and practical way.

In addition to connecting the application to the Python interpreter, the component can also work with its own runtime environment, allowing the required Python packages to be distributed together with the application. This makes it possible to create a complete installer containing everything the application needs to run, without requiring additional installations or manual configuration on the user’s computer.

The main idea is to simplify distribution: the setup installs the application, the Python runtime, and all required dependencies, leaving the environment ready to use.

With this approach, it becomes possible to develop applications in Lazarus while also taking advantage of Python’s advanced capabilities, greatly reducing the challenges related to dependency distribution.

So far, I have tested the component on Windows. To be fully transparent, it still needs to be validated on Linux, but Linux compatibility is part of the project’s goal.


Hello Lazarus community,

I would like to introduce my open source project:

https://github.com/marcelomaurin/CHATGPT/
..
The purpose of the project is to allow Lazarus applications to integrate AI in a practical way, using both external resources and local features.
..

The documentation is also being prepared with translations into several languages, .., English,..

The goal of TCHATGPT is to show that Lazarus / Free Pascal remains a viable platform for modern applications, including Artificial Intelligence, automation, computer vision and integration with local or cloud-based models.

Feedback, testing, suggestions and contributions are very welcome.

Repository:

https://github.com/marcelomaurin/CHATGPT/

A link to documentation would be breat. Is it something like local LLM which can be integrated into application? Can it be trained on a specific engineering tasks? I opened your git and instantly got lost, there is so much in there. From what you are saying, it sounds good, something I kept thinking about

marcelomaurinmartins@gmai

  • New Member
  • *
  • Posts: 24
Chromium Capture Demo: Lazarus integrated with Chromium

In the CHATGPT for Lazarus/Free Pascal project, I created the chromium_capture_demo sample using the TAIChromiumBrowser component integrated with Chromium/CEF4Delphi.

The goal is to allow a Lazarus application to open real web pages, interact with the DOM, execute JavaScript, capture HTML, and automate browser actions.

This enables several practical use cases:

website validation;
automated testing;
form filling;
data extraction;
technical page analysis;
support for authorized security audits;
integration between web systems and desktop applications.

In the healthcare area, this type of tool can be very useful for validating exam portals, appointment scheduling systems, administrative screens, registration forms, and internal pages that often do not provide an available API.

With Chromium embedded in Lazarus, it becomes possible to create desktop solutions capable of navigating, testing, capturing, and analyzing information from real web systems.

This sample shows how Lazarus remains a living, practical, and powerful tool for building modern applications, including AI-integrated solutions.

GitHub:
https://github.com/marcelomaurin/CHATGPT

#Lazarus #FreePascal #Chromium #CEF4Delphi #Automation #SoftwareTesting #DigitalHealth #HealthTech #OpenSource #ArtificialIntelligence #Pascal

 

TinyPortal © 2005-2018