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:
Popular in Other Resources
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance








