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

alvises
Connecting Elixir Nodes with libcluster, locally and on Kubernetes I’m not used to do screencasts :smiley: Please let me know any feedba...
New
ErlangSolutions
This month, we’re launching an in-depth 3-part webinar series on API design hosted by Bruce Tate. Bruce’s knowledge of, and love for Eli...
New
hectorperez
Hi, I found that a great way to learn is: play with existing livebook notebooks create new notebooks — completely new or just changing ...
New
luckywatcher
I’ve been working in Elixir for two years this month. I’ve enjoyed the community and the help I’ve received and want to give back in a sm...
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
NickGnd
Hey all :wave: I took me a bit more than 1 year but I finally managed to finish “Programming Machine Learning - From Coding to Deep Lear...
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
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
sergio
https://www.udemy.com/course/interviewing-tips-and-tricks-for-remote-engineers/ I always wanted to create my own course and share things...
New
crockwave
I updated my fork of the live_view_hooks demo repo to include fullCalendar integration, including JSON API, event creation and storage in...
New

Other popular topics Top

sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
985 42920 311
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
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
msaraiva
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
564 43622 214
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
stefanluptak
Hello everybody, usually, I use a 29" ultra-wide monitor for VSCode which can easily accomodate explorer (files panel) + file with code ...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
marick
I had some trouble figuring out how to make many-to-many associations work. Once I got it working, I wrote a blog post. Because I’m a nov...
New
svb
Hi! Currently I want to submit a form by pressing the Enter key. However, since my input field is of type “textarea” this is just adds a...
New

Latest on Elixir Forum

We're in Beta

About us Mission Statement