langchain-rust  by Abraxas-365

Rust SDK for building LLM applications

Created 1 year ago
1,082 stars

Top 35.1% on SourcePulse

GitHubView on GitHub
Project Summary

This Rust library provides a comprehensive implementation of the LangChain framework, enabling developers to build complex LLM-powered applications in Rust. It offers a composable interface for integrating various LLMs, embedding models, vector stores, chains, and agents, targeting Rust developers seeking robust and performant LLM application development.

How It Works

The library follows the LangChain philosophy of composability, abstracting away the complexities of interacting with different LLM providers and data sources. It utilizes Rust's strong type system and asynchronous capabilities to provide a safe and efficient environment for building LLM workflows. Key features include support for multiple LLM APIs (OpenAI, Azure OpenAI, Anthropic, Ollama), various embedding models, and a range of vector stores (OpenSearch, Postgres, Qdrant, Sqlite, SurrealDB).

Quick Start & Requirements

  • Installation: Add langchain-rust to your Cargo.toml. Optional features for vector stores include sqlite-vss, sqlite-vec, postgres, surrealdb, and qdrant.
  • Prerequisites: Rust toolchain.
  • Example: The README provides detailed examples for using LLM chains, document loaders (PDF, DOCX, HTML, CSV, Git commits, source code), and agents.

Highlighted Details

  • Supports numerous LLM providers including OpenAI, Azure OpenAI, Anthropic, and Ollama.
  • Integrates with multiple vector stores like Qdrant, PostgreSQL, and SurrealDB.
  • Offers a variety of document loaders for common file formats and source code.
  • Includes agent capabilities with tool integration for tasks like web search and command execution.

Maintenance & Community

The project is actively maintained by Abraxas-365. Further community engagement details are not explicitly provided in the README.

Licensing & Compatibility

The project is licensed under the MIT license, permitting commercial use and integration with closed-source applications.

Limitations & Caveats

While the library offers extensive features, some integrations like specific vector stores may require additional setup or external dependencies as noted in the installation instructions. The README indicates ongoing development with a comprehensive list of implemented features.

Health Check
Last Commit

1 week ago

Responsiveness

1 day

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

Explore Similar Projects

Feedback? Help us improve.