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?

Popular in Other Resources Top

Exadra37
I am building a Tasks Todo app to help me to organize my professional and personal life, while at same time I learn Elixir, and this week...
New
Blond11516
Does anyone have resources (articles, talks, etc.) they can share about “modern fullstack apps”? By “modern fullstack” I mean dynamic, s...
New
ErlangSolutions
Join the team from the Massachusetts Bay Transportation Authority as they explore their work with Elixir from three unique perspectives. ...
New
preciz
Last year I had this idea to stop practicing touch typing with gibberish and start using repositories from GitHub as the source of the t...
New
kpanic
Hi everyone, At the company where I work (Taxfix), we prepared an internal Elixir course for our folks. We decided to share it with eve...
New
aifrak
tl;td: My solutions are here and here. Elixir is awesome. Exercism is awesome. Thank you Elixir community. Recently, I have solved all t...
New
zkessin
I have a new free email course on how to best use types in Erlang and Elixir you can sign up here https://elixirtraining.org/types_cours...
New
ryan-senn
I’m learning Elixir and started to go through the Project Euler problems. While the problems are great, the UX is very limited. I’ve buil...
New
PJUllrich
I’m happy to announce RunElixir.com, a free online guide to Elixir. It aims to answer the questions: How can I get started with Elixir?, ...
New
krishna_vaguelyright
Hi I am new to Elixir, just started learning 3 weeks back. I am building a Chat App with Elixir/Phoenix as backend & React-Native on ...
New

Other popular topics Top

Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
Nvim
Anybody knows a comprehensive comparison of Django and Phoenix, thanks for the help. Where are they similar? Where do they differ the m...
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New
AstonJ
Please see the new poll here: Which code editor or IDE do you use? (Poll) (2022 Edition) It’s been a while since we first asked this, I...
208 31142 143
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New

We're in Beta

About us Mission Statement