boxcars  by BoxcarsAI

Ruby gem for AI composability, inspired by LangChain

created 2 years ago
453 stars

Top 67.6% on sourcepulse

GitHubView on GitHub
Project Summary

Boxcars is a Ruby gem for building AI-powered applications with composability, inspired by LangChain. It allows developers to chain together various components like LLMs (OpenAI, Anthropic, GPT4All), search engines, SQL databases, and Rails Active Record to solve complex problems.

How It Works

Boxcars utilizes a modular architecture with core concepts: Boxcar (an atomic unit of work like search or SQL execution), Engine (LLM interfaces like OpenAI), Prompt (templates for LLM interaction), VectorStore (for vector data), and Train (orchestrates multiple Boxcars, currently with a ZeroShot implementation). This composable approach allows for flexible and extensible AI workflows.

Quick Start & Requirements

  • Install: gem install boxcars or add gem 'boxcars' to your Gemfile and run bundle install.
  • Requirements: Ruby, environment variables for API keys (e.g., OPENAI_ACCESS_TOKEN, ANTHROPIC_API_KEY, SERPAPI_API_KEY).
  • Usage: require "boxcars". See Documentation for examples.

Highlighted Details

  • Supports OpenAI, Anthropic, and GPT4All engines.
  • Integrates with Google Search (SERP API), Wikipedia, SQL (ActiveRecord, Sequel), and Swagger APIs.
  • Features a Train concept for chaining operations, exemplified by ZeroShot.
  • Offers logging capabilities, including prompt logging.

Maintenance & Community

  • Open to contributions via pull requests and bug reports on GitHub.
  • Follows a Code of Conduct to foster a welcoming environment.
  • Community interaction channels are available via GitHub issues.

Licensing & Compatibility

  • MIT License.
  • Compatible with commercial use and closed-source linking.

Limitations & Caveats

The project is actively seeking ways to improve security against prompt manipulation. While inspired by LangChain, it is a newer implementation with ongoing development and feature expansion.

Health Check
Last commit

1 month ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
4 stars in the last 90 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), Jeff Hammerbacher Jeff Hammerbacher(Cofounder of Cloudera), and
9 more.

codex by openai

0.8%
32k
Coding agent CLI tool for terminal-based chat-driven development
created 3 months ago
updated 1 day ago
Feedback? Help us improve.