Overview

Embeddings

Completions

Images

Roadmap

Overview -- AI Desktop Environment

I started working on this local client for AI shortly after OpenAI fired Altmann for a hot second and chatgpt went offline. Confusion...WHERE ARE MY THREADS? Not a good time for this because I had left off the night before with something recently broken and wasn't being squirrelly with my versions. Which is to say I only had the latest crapped-out version. And I had come to understand much about Quaternions in Unity but I was keeping that knowledge entirely tucked away in that source code. IYKYK. Now my understanding was broken apparently.

A few scripts and an API key were enough to get something working well enough to store the conversations in a local database. ChatGPT came back online and I recovered my expertise, but I was up against a deadline and I didn't want any more rude interruptions.

Development continued...

The lack of a folder system with these AI chatbots makes me ill. Easy to implement, too, so I don't get it. A basic folder system was one of the first things I added and that alone was useful enough to justify the whole endeavor. I've been considering using an ECS approach to turning those folders into something like a "project", ie something more active when the time comes.

And on the subject of containers like folders or projects (as offered by Claude/chatgpt), if it can't hold an instance of its own type then its some kind of 90's crap. Reminds me of an old c++ compiler I used that supported recursion but only 7 calls deep maximum. ARE WE IN NORTH KOREA?

I had pretty much finished the interface for the chat completion api when the mixed input models became available. No choice then but to handle images, and then I might as well support the image api.

For additional scope metastasis, embeddings were added to the need-to-haves after I started looking at using RAG and then became curious about the transformer embeddings vs the old word2vec.

Development focuses on two things:

  • fully exploiting the commercial frontier APIs
  • tools that run on the local system

in anticipation of running models locally.

Embeddings

Related:

king - man + woman

The King and ChatGPT

For a few months, embeddings were everything. I got intrigued by some of those old "king/queen" videos and wanted to see if the gpt embeddings showed the same properties.

Endpoint: v1/embeddings

Models: text-embedding-ada-002, text-embedding-3-small, text-embedding-3-large

Those old gensim videos showed how vector arithmetic could produce something like a semantic transformation when working with word2vec embeddings. To reproduce with gpt embeddings, the software I've written has a fairly extensive set of vector operations: normalize, dot product, 7D curl (IYKYK), etc... Dimension reduction using tSNE. Mulling over adding umap.

Mostly, I am interested in operating on blocks of texts, but to test my setup I wanted to reproduce what I'd seen with the word2vec embeddings .

This software will read the text and binary files like those in the nlpl repository (http://vectors.nlpl.eu/repository). Currently, embeddings are read from the file on-demand and put into a database. The idea here is that relatively few embeddings will be of interest and once in the database, there is no need to spend time parsing the file.

Most of what I've done was with the GoogleNews-vectors-negative300.bin file and other word2vec output.

Nearest-neighbor searching is only among those embeddings in the database, unlike with gensim which provides a list of the top N closest matches in the entire vocabulary. Such a thing has no applicability when using the gpt embeddings with blocks of text but I still think it would be nice to have so I will probably implement some kind of FAISS/ANN scheme. I'll need to deal with a vector database at some point though.

I am releasing a version of the software that works with the nlpl files (http://vectors.nlpl.eu/repository), even though feature-wise it lags behind gensim for the target data. But if you want to play around with that data and don't want to deal with Python, you are welcome to use it.

Completions

(For those of you who notice: Yes, GPT 4o responded with "is a ancient".)

For generating conversations, I had to pick something to start with and I went with this chat completion api of OpenAIs because it looked like the quickest way forward. And I already had an account.

The software utilizes the chat completion endpoint /v1/chat/completions with OpenAI and, quite by coincidence, DeepSeek/Anthropic/Gemini as well.

When I started using AI for applications, I thought there would be a lot of work to do with model parameters like temperature, top_p, etc... But after gpt3.5, imo, not really. There are safeguarding (eg, max_tokens) and management parameters (eg, # of responses) but the performance parameters I rarely change from the default anymore. The software keeps a record of the parameters and everything else for analysis anyway, and this might become relevant again someday, who knows.

System prompts are stored with the threads. Pre-caching I was using this a bit to save on cost with chat completions. I still use custom system prompts a lot, mostly to prevent the AI from wasting tokens doing things I don't want it to do.

Responses API added. But this is the last API (of course the bigs all provide it or chimera) I'm going to accomodate for awhile.'

Images

Currently calls dall-e-2 and dall-e-3 with /generations, /edits and /variations endpoints.

Graphics really aren't my thing so this gets relatively short shrift. The limits of my ambitions here are to provide a way to draw on an image or create a selection mask in the browser window and feed it back to subsequent prompts.

Roadmap

A few months ago I felt like this software was at its first milestone. Which is to say, fully exploiting the chat completion api with the newer multimedia models. Sure, there were a few issues with the Markdown but...

The software fell behind when the newer reasoning models were introduced and I was otherwise occupied, with embeddings among other things.

Milestone keeps moving by staying in place.

Priorities:

  • image mods
  • vector database/FAISS/ANN
  • Deepseek/Gemini/Claude