langchain4j  by langchain4j

Java library for LLM application development

Created 2 years ago
9,022 stars

Top 5.7% on SourcePulse

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

14 hours ago

Responsiveness

1 week

Pull Requests (30d)
101
Issues (30d)
86
Star History
315 stars in the last 30 days

Explore Similar Projects

Starred by Elvis Saravia Elvis Saravia(Founder of DAIR.AI), Tom Moor Tom Moor(Head of Engineering at Linear; Founder of Outline), and
5 more.

promptable by cfortuner

0%
2k
TS/JS library for building full-stack AI apps
Created 2 years ago
Updated 2 years ago
Feedback? Help us improve.