t’s great that Embarcadero has added an AI Chat window to RAD Studio, but let’s be honest—the implementation is lacking. As one participant at a recent workshop noted: “It looks like someone wrote it two hours before the release.” Sadly, I have to agree. The AI Chat feature is practically useless if you intend to use AI for anything more than a quick demo.
That’s when I started considering better ways to interface with LLMs. Instead of searching for an alternative, I decided to build my own AI chat interface. It’s called Chatterbox, and it’s fully open source. You can find it on GitHub under a “do with it (almost) whatever you want” license.
To start using Chatterbox, you can either build it from source or download the precompiled EXE from GitHub (currently available only for Windows 32-bit). The app is written with FireMonkey, so—at least theoretically—it can also be built for macOS, iOS, Android, and Linux. However, I haven’t tested it on platforms other than Windows.
To build Chatterbox, you’ll need the following libraries: Spring4D, DCPCrypt2, and TAES. Links to these dependencies are included in the README file.
So, what is Chatterbox? is a simple application with a tabbed interface where each tab represents an active chat. Each chat tab is divided into three sections:
- History Memo (top): Displays all questions and answers.
- Question Memo (middle): Lets you type new questions.
- Chat Toolbar (bottom): Provides controls specific to the current chat.
Here’s a quick rundown of the toolbars:
Main Toolbar
- New Chat (Ctrl+N): Opens a new chat tab.
- Settings: Opens the settings dialog.
Chat Toolbar
- Engine Selector: A dropdown to choose the AI engine for the current tab.
- Send (Ctrl+Enter): Sends the chat history and current question to the selected AI engine.
- Send to All: Sends the current question to all open tabs, enabling you to compare results from different engines.
- Save (Ctrl+S): Saves the chat history to a text file.
- Open (Ctrl+O): Loads a chat history from a text file.
- Copy (Ctrl+Shift+C): Copies the last AI response to the clipboard.
- Clear: Clears the chat history.
- Close (Ctrl+W): Closes the current tab.
Settings
It’s possible to configure multiple engines using the same provider. For example, in my setup, I have two engines—o1-mini
and o1 (general)
—that both use OpenAI as the provider. The former is set up for Delphi-related queries, using the o1-mini
model and the system prompt “You are an experienced Delphi programmer”. The latter uses the o1-preview
model without a system prompt for general questions.
One engine is always marked as the Default Engine, which will be used when opening a new tab.
No comments:
Post a Comment