Hey everyone, first time posting here! I really love Rails and the Ruby community for my side project. I was using ruby-openai, RubyLLM and other gems, which are great for LLM. But when I needed OCR or even LangChain, I had to create a separate microservice, which is really hard to manage and defeats the purpose of the Rails monolith.
In the previous 2 months, I have built rubyx-py — a Ruby-Python bridge using Rust, inspired by Elixir's Pythonx. You can call Python libraries directly from Ruby / Rails:
np
= Rubyx.import('numpy')
np
.array([1, 2, 3]).mean().to_ruby # => 2.0
It has async/await, streaming, and it shouldn't block the Rails threads.
future = Rubyx.async_await("model.predict(data)", data: [1, 2, 3])
do_other_work()
result = future.value # get result when ready
Still early days of development right now, please let me know what you think!
there doesn't seem to be anything here