We are trying to develop a LLM chat agent. So far lot of libraries have been written in JS or Python. But Elixir provides an excellent WebSocket support
So we decided to use Elixir Phoenix Sockets to stream responses from LLMs for Chats
Has anyone done this? what are the libraries you used? Any drawbacks on this approach?
Will SSE would be a better option than phoenix sockets?
the main problem i saw was all the manual work he had to do to get streaming response from the LLM. For example if we want to switch to Gemini at some point or a custom model have to repeat same kind of code again
This has definitely been a pain point for us as well. I know it’s asking for a lot but an equivalent of something like AI SDK by Vercel for elixir would be huge. It’s one of the few times where we’ve really been bit by the smaller ecosystem of elixir. Most of the time you can just write it yourself but as @kasvith mentioned its a lot of manual work to implement streaming for each provider.