pycall.rb
boxcars
pycall.rb | boxcars | |
---|---|---|
6 | 5 | |
1,030 | 412 | |
- | 2.2% | |
6.0 | 8.4 | |
7 months ago | 9 days ago | |
C | Ruby | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
pycall.rb
- Call Python functions from the Ruby language
-
RFC: Run Python from Ruby and Ruby from Python
Yeah, I know there are few libraries that do similar things: pycall.rb and rb_call, and there is also rubypython, but it's not supported and doesn't work with Python 3. I used pycall to create matplotlib charts from Ruby, it's great, and I'm gonna use part of its code, type conversion implementation, for example. But I don't think it's enough, it's like a one way bridge, I want more, I want to call Python from Ruby and Ruby from Python at the same time: create an Airfow PythonOperator, invoke Ruby code inside, store some value into XCom. What about rb_call, I don't like how it's implemented at all, it starts a separate process and serializes data using MessagePack RPC, so you can't use callbacks. It's not even possible to pass a Python object as an argument or call Ruby method that requires a block. And of course it's not effective.
-
Building an app around a LLM, Rails + Python or just Python?
I have build a rails app that uses openai gem and it's working very well. For more advanced things I am exploring Pycall: https://github.com/mrkn/pycall.rb to call python functions. Don't have any experience though.
-
What's the easiest way to interface my Rails app with a Python library?
I have use this before cool and easy also could run in heroku ()( for my case https://github.com/mrkn/pycall.rb
-
Help!
From docs. I was able to install matplotlib (without --pre):
-
Tips for collaborating with datascience teams
We use https://github.com/mrkn/pycall.rb extensively to interface with python libraries. So far, the only problem we have is memory leaks in python, but we mitigated the problem by isolating the leaking parts in a separate process.
boxcars
-
Building an app around a LLM, Rails + Python or just Python?
currently in the same boat as you at my company, we've been looking at Boxcars and LangchainRB as our gems but they're pretty new to the scene so not sure about that. I love the idea of langchain for the extensibility of it though - we used the ruby-openai gem for a while but it didn't do what we needed. I'll come back in a week or two with with what we decide (python microservice with flask served api endpoints vs ruby all the way)
-
5 things I wish I knew before building a GPT agent for log analysis
I started with Langchain, but I had a hell of time debugging and tweaking the framework to suit my needs. Next, I shifted to Boxcars, which has fewer abstractions. While Boxcars was easier to understand, I still struggled when things behaved differently than Iβd expected. Finally, I said screw itβ¦Iβm not doing that much:
-
Re-implementing LangChain in 100 lines of code
We ported the core of LangChain to Ruby, and while it is way more that 100 lines, I would give similar feedback as the author. Here is the repo if anyone is interested https://github.com/BoxcarsAI/boxcars
- Boxcars β Build LLM Application in Ruby on Rails
- ROR app and integrating ChatGPT
What are some alternatives?
hashpling - hashpling allows you to use shebang on non-UNIX platform
ruby-openai - OpenAI API + Ruby! π€β€οΈ Now with Assistants v2, Batches & Ollama/Groq π
data-science-with-ruby - Practical Data Science with Ruby based tools.
langchain - π¦π Build context-aware reasoning applications
soloud - Free, easy, portable audio engine for games
gpti - A simple REPL for interacting with OpenAI's GPT models
langchain - β‘ Building applications with LLMs through composability β‘ [Moved to: https://github.com/langchain-ai/langchain]
rubypython - An in-process between Ruby and Python. Soon changing repo address.
Scenic - Versioned database views for Rails
TryRuby - This 4th iteration of TryRuby is a website where you can learn the Ruby language.
langchainrb - Build LLM-powered applications in Ruby