{"repo":"nicieja/lammy","free":true,"listed":false,"github":"https://github.com/nicieja/lammy","clone":"git clone https://github.com/nicieja/lammy.git","description":"An LLM library for Ruby","language":"Ruby","stars":39,"topics":["claude","gem","gemini","gpt","llm","openai","rails","ruby"],"license":"MIT","category":"ai-agents","readme_excerpt":"Lammy Lammy is a simple LLM library for Ruby. It doesn't treat prompts as just strings. They represent the entire code that generates the strings sent to a LLM. The abstraction also makes it easy to attach these methods directly to models, avoiding the need for boilerplate service code. The approach is inspired by Python's ell. I haven't come across a Ruby port yet, so I decided to start experimenting on my own. Why? I wanted to create a simple library that would let me use LLMs in my Ruby projects without dealing with a lot of boilerplate code. Using something like langchain felt too complex for many of my needs. Another option would be to integrate a library directly with a framework like Ruby on Rails, leveraging its conventions. You could, for example, store prompts in the database or as views. But that seemed like overkill for what I needed, and it would add a dependency on the framework, making it harder to use in simple programs. Personally, I don't think prompt engineering needs to be that complicated, which is why the ell approach—treating prompts like simple functions—really resonated with me. I wanted to bring something similar to Ruby. I don’t see why LLMs can't be treated like databases in Active Record, where all the complexity is abstracted away. You can query without needing to think much about the underlying SQL. With Lammy, the idea is similar: you just define your prompt in a method on a model and call it like any other method. Installation Bundler Add this","default_branch":null,"files":null,"tree":[],"storefront":"/r/nicieja","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/nicieja/lammy/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}