Just code it yourself. Most of the core logic can be replaced with a function that that inserts some parameters into a string template and calls an API.
This was the answer for myself as well, pretty cool that we are still at the level where if you have an idea you can build a proof extremely quickly and easily.
I've been actively contributing to Langroid as well. It is easy to use, and the intuitive design allows for the rapid development of LLM applications, streamlining the whole process. Highly recommended for anyone looking into this space!
for m in reversed(self.messages):
if total_tokens + m.length <= max_tokens:
recent_messages_reversed.append({
"role": m.role,
"content": m.text
})
total_tokens += m.length
else:
break
It would be important to change that to not drop system prompts, ever. Otherwise a user can defeat the system prompt simply by providing enough user messages.
I see two contenders:
https://github.com/minimaxir/simpleaichat/tree/main/simpleai...
https://github.com/griptape-ai/griptape
There is also the llm command line utility that has a very thin underlying library, but which might grow eventually: https://github.com/simonw/llm