Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/langchain4j/langchain4j
Java version of LangChain
https://github.com/langchain4j/langchain4j
anthropic chatgpt chroma embeddings gemini gpt huggingface java langchain llama milvus ollama onnx openai openai-api pgvector pinecone vector-database weaviate
Last synced: 29 days ago
JSON representation
Java version of LangChain
- Host: GitHub
- URL: https://github.com/langchain4j/langchain4j
- Owner: langchain4j
- License: apache-2.0
- Created: 2023-06-20T15:30:29.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-27T11:14:44.000Z (7 months ago)
- Last Synced: 2024-04-28T05:06:33.636Z (6 months ago)
- Topics: anthropic, chatgpt, chroma, embeddings, gemini, gpt, huggingface, java, langchain, llama, milvus, ollama, onnx, openai, openai-api, pgvector, pinecone, vector-database, weaviate
- Language: Java
- Homepage: https://docs.langchain4j.dev
- Size: 4.24 MB
- Stars: 3,175
- Watchers: 70
- Forks: 597
- Open Issues: 206
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-langchain-zh - LangChain4j
- awesome-ChatGPT-repositories - langchain4j - Java version of LangChain (Langchain)
- awesome-langchain - LangChain4j
- StarryDivineSky - langchain4j/langchain4j
- awesome-chatgpt - langchain4j/langchain4j - Simplify the integration of AI/LLM capabilities into your Java application using LangChain4j, providing a layer of abstractions and implementations for various LLMs and embedding stores. (SDK, Libraries, Frameworks / Other sdk/libraries)
- Awesome-LLM-RAG-Application - langchain4j
README
# LangChain for Java: Supercharge your Java application with the power of LLMs
[![Build Status](https://img.shields.io/github/actions/workflow/status/langchain4j/langchain4j/main.yaml?branch=main&style=for-the-badge&label=GITHUB%20ACTIONS&logo=github)](https://github.com/langchain4j/langchain4j/actions/workflows/main.yaml)
[![Discord](https://dcbadge.vercel.app/api/server/JzTFvyjG6R?style=for-the-badge)](https://discord.gg/JzTFvyjG6R)
[![X](https://img.shields.io/badge/@langchain4j-follow-blue?logo=x&style=for-the-badge)](https://x.com/langchain4j)
[![Maven Version](https://img.shields.io/maven-central/v/dev.langchain4j/langchain4j?logo=apachemaven&style=for-the-badge)](https://search.maven.org/#search|gav|1|g:"dev.langchain4j"%20AND%20a:"langchain4j")## Introduction
Welcome!
The goal of LangChain4j is to simplify integrating LLMs into Java applications.
Here's how:
1. **Unified APIs:**
LLM providers (like OpenAI or Google Vertex AI) and embedding (vector) stores (such as Pinecone or Milvus)
use proprietary APIs. LangChain4j offers a unified API to avoid the need for learning and implementing specific APIs for each of them.
To experiment with different LLMs or embedding stores, you can easily switch between them without the need to rewrite your code.
LangChain4j currently supports [15+ popular LLM providers](https://docs.langchain4j.dev/integrations/language-models/)
and [15+ embedding stores](https://docs.langchain4j.dev/integrations/embedding-stores/).
2. **Comprehensive Toolbox:**
Since early 2023, the community has been building numerous LLM-powered applications,
identifying common abstractions, patterns, and techniques. LangChain4j has refined these into practical code.
Our toolbox includes tools ranging from low-level prompt templating, chat memory management, and function calling
to high-level patterns like AI Services and RAG.
For each abstraction, we provide an interface along with multiple ready-to-use implementations based on common techniques.
Whether you're building a chatbot or developing a RAG with a complete pipeline from data ingestion to retrieval,
LangChain4j offers a wide variety of options.
3. **Numerous Examples:**
These [examples](https://github.com/langchain4j/langchain4j-examples) showcase how to begin creating various LLM-powered applications,
providing inspiration and enabling you to start building quickly.LangChain4j began development in early 2023 amid the ChatGPT hype.
We noticed a lack of Java counterparts to the numerous Python and JavaScript LLM libraries and frameworks,
and we had to fix that!
Although "LangChain" is in our name, the project is a fusion of ideas and concepts from LangChain, Haystack,
LlamaIndex, and the broader community, spiced up with a touch of our own innovation.We actively monitor community developments, aiming to quickly incorporate new techniques and integrations,
ensuring you stay up-to-date.
The library is under active development. While some features are still being worked on,
the core functionality is in place, allowing you to start building LLM-powered apps now!## Documentation
Documentation can be found [here](https://docs.langchain4j.dev).## Getting Started
Getting started guide can be found [here](https://docs.langchain4j.dev/get-started).## Code Examples
Please see examples of how LangChain4j can be used in [langchain4j-examples](https://github.com/langchain4j/langchain4j-examples) repo:
- [Examples in plain Java](https://github.com/langchain4j/langchain4j-examples/tree/main/other-examples/src/main/java)
- [Examples with Quarkus](https://github.com/quarkiverse/quarkus-langchain4j/tree/main/samples) (uses [quarkus-langchain4j](https://github.com/quarkiverse/quarkus-langchain4j) dependency)
- [Example with Spring Boot](https://github.com/langchain4j/langchain4j-examples/tree/main/spring-boot-example/src/main/java/dev/langchain4j/example)## Useful Materials
Useful materials can be found [here](https://docs.langchain4j.dev/useful-materials).## Get Help
Please use [Discord](https://discord.gg/JzTFvyjG6R) or [GitHub discussions](https://github.com/langchain4j/langchain4j/discussions)
to get help.## Request Features
Please let us know what features you need by [opening an issue](https://github.com/langchain4j/langchain4j/issues/new/choose).## Contribute
Contribution guidelines can be found [here](https://github.com/langchain4j/langchain4j/blob/main/CONTRIBUTING.md).