Technical

OgbujiPT 0.6 release musings

Osi Ogbuji
#AI#Python#LLM#open source#database

OgbujiPT text logo

Last week OpenAI made breaking changes to their popular, open source Python client package. It provides a convenient interface to their popular HTTP API, which is also emulated by private LLM hosting software such as llama-cpp-python, and is the underlying connector for popular toolkits such as LangChain. Their changes came without warning, and so caused a lot of breakage in software downstream. A bit annoying, but we’ve been able to make the changes to make OgbujiPT compatible with the latest versions of their package.

We use the PostgreSQL DBMS heavily at Oori, including its PGVector extension, which comes in handy with Retrieval Augmented Generation (RAG) and other usage patterns for LLMs. In this release, we have enhanced OgbujiPT’s PGVector support with improvements in query dynamics, efficiency, and testing. Additionally, adjustments have been made to the continuous integration setup for seamless integration.

For some of our use cases which store a lot of data, only some of which is in the form of embeddings, and the way this data is all used in practice, the LLM becomes the primary speed bottleneck. In such cases we like the fit of a traditional DBMS with added vectors storage capability. As ever in this space, we pay more attention to the tool’s fit than how new and shiny it is. OgbujiPT still has Qdrant and Chroma support in place, but PostgreSQL has proven itself as a robust and enduring choice for DBMS applications due to its stability, reliability, and versatility over the decades, making it a steadfast and dependable option.

Over the past couple of releases we’ve worked hard to clean up and simplify the API. The work to encapsulate LLM connections in the llm_wrapper module has been greatly cleaned up, properly propagated across tests and demos, and updated in state management to work with the new behavior of the upstream python-openai package.

OgbujiPT is a client-side toolkit for using large language models (LLMs). You can use it with private, self-hosted models, or with the likes of ChatGPT, Claude and Bard. The latest release, 0.6.0 0.6.21 is available on GitHub and The Python Package Index (PyPI). We use the package every day in our practice, and this release touches on some issues and trends we deal with. For a more thorough look at the changes this version, check out the release notes.

1

We quickly released version 0.6.1 and 0.6.2 to improve the way the MessageDB subclass of PGVectorHelper stores messages. In 0.6.0, sequential integers were used as the primary key, resulting in a less coherent column with potentially arbitrary growth in different conversations. Version 0.6.1 utilized PostgreSQL’s TIMESTAMP and Python’s datetime.utcnow() for the primary key, offering a more structured and scalable approach. Finally, 0.6.2 uses TIMESTAMP WITH TIME ZONE and datetime.utcnow().replace(tzinfo=timezone.utc). Speaking as a relatively young software engineer, I am learning to just love dealing with timezones!

About the author

portrait
Osi Ogbuji (they/him)

Osi is a backend software and AI engineer, working on the infrastructure behind Oori’s projects and products. Before helping found Oori, they studied mechanical engineering at the University of Colorado.

osi@oori.dev
LinkedIn