Jump to content

New ChatLLM application.

Recommended Posts

Posted (edited)

I have created a new Delphi application called ChatLLM  for chatting with Large Language Models (LLMs).  Its primary purpose is to act as a coding assistant.



  • Supports both cloud based LLM models (ChatGPT) and local models using Ollama.
  • Supports both the legacy completions and the chat/completions endpoints.
  • The chat is organized around multiple topics.
  • Can save and restore the chat history and settings.
  • Streamlined user interface.
  • Syntax highlighting of code (python and pascal).
  • High-DPI awareness.


The application uses standard HTTP client and JSON components from the Delphi RTL and can be easily integrated in other Delphi applications. 


You do not need an API key to use Ollama models and usage is free. It provides access to a large number of LLM models such as codegemma from Google and codelllama from Meta.  The downside is that it may take a long time to get answers, depending on the question, the size of the model and the power of your CPU and GPU.


Chat topics

The chat is organized around topics. You can create new topics and move back and forth between the topics using the next/previous buttons on the toolbar. When you save the chat all topics are soved and then restored when you next start the application. Questions within a topic are asked in the context of the previous questions and answers of that topic.



Settings using gpt-3.5-turbo, which is cheaper and faster than gpt-4:







Further prompting:




The code is not actually correct (Serialize returns a string) but it is close.


If you want to test ChatLLM you can download the executable.


Edited by pyscripter
  • Like 10
  • Thanks 3

Share this post

Link to post

This looks very interesting. One question, are tuning up the AI for Delphi specifically or are you just using the AI as provided?

Share this post

Link to post
26 minutes ago, hsauro said:

One question, are tuning up the AI for Delphi specifically or are you just using the AI as provided

The latter.

Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now