sonic182

sonic182

Livellm - a reference for integrating llm_composer into a real Elixir application

Hi everyone,

I’d like to share Livellm, a small open-source Phoenix LiveView chat app built as a reference for integrating llm_composer into a real Elixir application.

The main goal is to show how Elixir and Phoenix fit this kind of use case very naturally: LiveView for the chat UI, llm_composer for unified multi-provider LLM access, background tasks for non-blocking requests, PubSub for streaming updates, and OTP patterns for keeping the app responsive and simple.

It demonstrates a practical setup for:

  • streaming LLM output into LiveView in real time
  • switching providers behind one API
  • handling reasoning output separately
  • tracking token usage and cost
  • persisting chat state locally (sqlite)

I used this app yesterday as part of a demo for a talk about llm_composer at the Elixir Madrid meetup, and decided to publish it as a small reference project in case it is useful to others exploring similar patterns.

It is intentionally minimal and not meant to be a full chat platform, but rather a compact example of how Phoenix LiveView, PubSub, OTP, and unified LLM access can work together in practice.

Feedback is very welcome.

Repo:

https://github.com/sonic182/livellm

Where Next?

Trending in Other Resources Top

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
ausimian
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
type1fool
I just stumbled on a newly redesigned elixir-lang.org. :tada: It looks like @Software_Mansion did the work, and I think it is generally a...
New
akoutmos
@hugobarauna and I (Alex Koutmos) have been hard at work on writing a book on Nerves that takes you from simply blinking LEDs to building...
New

We're in Beta

About us Mission Statement