langchain4j  by langchain4j

Java library for LLM application development

created 2 years ago
8,545 stars

Top 6.1% on sourcepulse

GitHubView on GitHub
Project Summary

LangChain4j provides a Java-centric framework for integrating Large Language Models (LLMs) into applications, offering unified APIs for diverse LLM providers and embedding stores, along with a comprehensive toolkit for common LLM patterns. It targets Java developers seeking to leverage LLMs for tasks like chatbots and Retrieval Augmented Generation (RAG) without vendor lock-in or the need to learn multiple proprietary APIs.

How It Works

LangChain4j abstracts away the complexities of interacting with various LLM and embedding store providers through unified interfaces. This allows developers to easily swap implementations, fostering flexibility and reducing boilerplate code. The framework provides a rich set of abstractions for common LLM application patterns, including prompt templating, memory management, function calling, Agents, and RAG pipelines, offering multiple ready-to-use implementations for each.

Quick Start & Requirements

Highlighted Details

  • Supports 15+ LLM providers and 15+ embedding stores.
  • Implements core LLM patterns: Agents, RAG, prompt templating, memory management, function calling.
  • Integrates with popular Java frameworks like Quarkus, Spring Boot, and Helidon.
  • Offers an experimental documentation chatbot.

Maintenance & Community

  • Actively developed since early 2023, incorporating community developments.
  • Help available via Discord and GitHub discussions.
  • Contribution guidelines are available.

Licensing & Compatibility

  • Apache License 2.0.
  • Permissive license suitable for commercial use and integration into closed-source applications.

Limitations & Caveats

The library is under active development, with some features still in progress. An experimental documentation chatbot is provided.

Health Check
Last commit

1 day ago

Responsiveness

1 week

Pull Requests (30d)
119
Issues (30d)
79
Star History
1,291 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.