boxcars  by BoxcarsAI

Ruby gem for AI composability, inspired by LangChain

Created 2 years ago
458 stars

Top 66.1% on SourcePulse

GitHubView on GitHub
1 Expert Loves This Project
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 day ago

Responsiveness

1 day

Pull Requests (30d)
18
Issues (30d)
0
Star History
2 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.