Go to file
Bjarne-Kinkel aa0e488166
Adding GoogleAiGeminiStreamingChatModel (#1951)
## Issue
Closes #1903

## Change
Implemented the GoogleAiGeminiStreamingChatModel.

This PR depends on #1950.

## General checklist
- [X] There are no breaking changes
- [x] I have added unit and integration tests for my change
- [x] I have manually run all the unit and integration tests in the
module I have added/changed, and they are all green
- [x] I have manually run all the unit and integration tests in the
[core](https://github.com/langchain4j/langchain4j/tree/main/langchain4j-core)
and
[main](https://github.com/langchain4j/langchain4j/tree/main/langchain4j)
modules, and they are all green
- [x] I have added/updated the
[documentation](https://github.com/langchain4j/langchain4j/tree/main/docs/docs)
- [ ] I have added an example in the [examples
repo](https://github.com/langchain4j/langchain4j-examples) (only for
"big" features)
- [ ] I have added/updated [Spring Boot
starter(s)](https://github.com/langchain4j/langchain4j-spring) (if
applicable)
2024-10-31 10:07:50 +01:00
.devcontainer Add Dev Container support (#337) 2023-12-12 19:36:45 +01:00
.github Run under JDK 23 (#1978) 2024-10-30 16:22:31 +01:00
.mvn #1929 tinylog level surefire (#1955) 2024-10-21 10:29:32 +02:00
code-execution-engines #1506 refactor enforcer plugin (#1923) 2024-10-16 17:38:47 +02:00
docker/ollama feat : create llama3 model image (#1083) 2024-05-10 13:33:18 +02:00
docs Adding GoogleAiGeminiStreamingChatModel (#1951) 2024-10-31 10:07:50 +01:00
document-loaders #1506 refactor enforcer plugin (#1923) 2024-10-16 17:38:47 +02:00
document-parsers #1506 refactor enforcer plugin (#1923) 2024-10-16 17:38:47 +02:00
document-transformers/langchain4j-document-transformer-jsoup updated version to 0.36.0-SNAPSHOT 2024-09-25 15:23:52 +02:00
embedding-store-filter-parsers/langchain4j-embedding-store-filter-parser-sql #1506 refactor enforcer plugin (#1923) 2024-10-16 17:38:47 +02:00
experimental/langchain4j-experimental-sql #1929 tinylog level surefire (#1955) 2024-10-21 10:29:32 +02:00
langchain4j fix test test_backwards_compatibility_with_0_27_1 (#1991) 2024-10-30 09:14:57 +01:00
langchain4j-anthropic #1506 refactor enforcer plugin (#1923) 2024-10-16 17:38:47 +02:00
langchain4j-azure-ai-search #1929 tinylog level surefire (#1955) 2024-10-21 10:29:32 +02:00
langchain4j-azure-cosmos-mongo-vcore #1506 refactor enforcer plugin (#1923) 2024-10-16 17:38:47 +02:00
langchain4j-azure-cosmos-nosql #1506 refactor enforcer plugin (#1923) 2024-10-16 17:38:47 +02:00
langchain4j-azure-open-ai Migrated the "responsible AI" integration tests to GitHub Models (#1945) 2024-10-18 10:00:09 +02:00
langchain4j-bedrock #1929 tinylog level surefire (#1955) 2024-10-21 10:29:32 +02:00
langchain4j-bom #1929 tinylog level surefire (#1955) 2024-10-21 10:29:32 +02:00
langchain4j-cassandra #1929 tinylog level surefire (#1955) 2024-10-21 10:29:32 +02:00
langchain4j-chatglm #1506 refactor enforcer plugin (#1923) 2024-10-16 17:38:47 +02:00
langchain4j-chroma Fix #1747 (#1949) 2024-10-21 13:38:53 +02:00
langchain4j-cohere #1506 refactor enforcer plugin (#1923) 2024-10-16 17:38:47 +02:00
langchain4j-core Deprecate old EmbeddingStore.findRelevant() APIs for removal 2024-10-30 16:06:13 +01:00
langchain4j-couchbase updated version to 0.36.0-SNAPSHOT 2024-09-25 15:23:52 +02:00
langchain4j-dashscope DashScope: Encapsulate the calls to listeners into methods for better reuse. (#1967) 2024-10-22 11:53:39 +02:00
langchain4j-easy-rag #1929 tinylog level surefire (#1955) 2024-10-21 10:29:32 +02:00
langchain4j-elasticsearch #1506 refactor enforcer plugin (#1923) 2024-10-16 17:38:47 +02:00
langchain4j-github-models Migrated the "responsible AI" integration tests to GitHub Models (#1945) 2024-10-18 10:00:09 +02:00
langchain4j-google-ai-gemini Adding GoogleAiGeminiStreamingChatModel (#1951) 2024-10-31 10:07:50 +01:00
langchain4j-hugging-face #1506 refactor enforcer plugin (#1923) 2024-10-16 17:38:47 +02:00
langchain4j-infinispan InfinispanEmbeddingStore: adopt new EmbeddingStore.search(EmbeddingSearchRequest) API 2024-10-30 15:42:14 +01:00
langchain4j-jina updated version to 0.36.0-SNAPSHOT 2024-09-25 15:23:52 +02:00
langchain4j-jlama #1929 tinylog level surefire (#1955) 2024-10-21 10:29:32 +02:00
langchain4j-local-ai #1929 tinylog level surefire (#1955) 2024-10-21 10:29:32 +02:00
langchain4j-milvus Fix #1747 (#1949) 2024-10-21 13:38:53 +02:00
langchain4j-mistral-ai #1506 refactor enforcer plugin (#1923) 2024-10-16 17:38:47 +02:00
langchain4j-mongodb-atlas #1506 refactor enforcer plugin (#1923) 2024-10-16 17:38:47 +02:00
langchain4j-neo4j Neo4jEmbeddingStore: adopt new EmbeddingStore.search(EmbeddingSearchRequest) API 2024-10-30 15:44:21 +01:00
langchain4j-nomic #1506 refactor enforcer plugin (#1923) 2024-10-16 17:38:47 +02:00
langchain4j-ollama Use system property to configure logging (#1937) 2024-10-17 09:53:22 +02:00
langchain4j-onnx-scoring #1929 tinylog level surefire (#1955) 2024-10-21 10:29:32 +02:00
langchain4j-open-ai #1929 tinylog level surefire (#1955) 2024-10-21 10:29:32 +02:00
langchain4j-opensearch OpenSearchEmbeddingStore: adopt new EmbeddingStore.search(EmbeddingSearchRequest) API 2024-10-30 15:49:43 +01:00
langchain4j-oracle Tiny fix for `EmbeddingStoreWithFilteringIT` (#1925) 2024-10-15 17:28:36 +02:00
langchain4j-ovh-ai updated version to 0.36.0-SNAPSHOT 2024-09-25 15:23:52 +02:00
langchain4j-parent #1929 tinylog level surefire (#1955) 2024-10-21 10:29:32 +02:00
langchain4j-pgvector #1636 Get rid of Lombok in langchain4j-core (#1987) 2024-10-29 15:05:03 +01:00
langchain4j-pinecone Fix #1747 (#1949) 2024-10-21 13:38:53 +02:00
langchain4j-qdrant #1506 refactor enforcer plugin (#1923) 2024-10-16 17:38:47 +02:00
langchain4j-qianfan #1506 refactor enforcer plugin (#1923) 2024-10-16 17:38:47 +02:00
langchain4j-redis [Bug] Fix #1340 (#1981) 2024-10-30 09:56:41 +01:00
langchain4j-tablestore Apply additional AssertJ best practices since #673 (#1904) 2024-10-14 16:34:09 +02:00
langchain4j-vearch VearchEmbeddingStoreIT: adopt new EmbeddingStore.search(EmbeddingSearchRequest) API 2024-10-30 15:55:41 +01:00
langchain4j-vertex-ai #1506 refactor enforcer plugin (#1923) 2024-10-16 17:38:47 +02:00
langchain4j-vertex-ai-gemini #1929 tinylog level surefire (#1955) 2024-10-21 10:29:32 +02:00
langchain4j-vespa #1506 refactor enforcer plugin (#1923) 2024-10-16 17:38:47 +02:00
langchain4j-voyage-ai #1506 refactor enforcer plugin (#1923) 2024-10-16 17:38:47 +02:00
langchain4j-weaviate WeaviateEmbeddingStore: adopt new EmbeddingStore.search(EmbeddingSearchRequest) API 2024-10-30 16:05:48 +01:00
langchain4j-workers-ai #1506 refactor enforcer plugin (#1923) 2024-10-16 17:38:47 +02:00
langchain4j-zhipu-ai #1929 tinylog level surefire (#1955) 2024-10-21 10:29:32 +02:00
web-search-engines #1929 tinylog level surefire (#1955) 2024-10-21 10:29:32 +02:00
.editorconfig #1636 Get rid of Lombok in langchain4j-core (#1987) 2024-10-29 15:05:03 +01:00
.gitattributes Added in-process embedding models (#41) 2023-07-23 19:05:13 +02:00
.gitignore 增加智谱model类型 (#1239) 2024-06-06 14:40:06 +02:00
.prettierrc OpenAI DALL·E support (#298) 2023-12-19 11:37:11 +01:00
CODE_OF_CONDUCT.md Create a Code of Conduct (#825) 2024-04-18 14:34:30 +02:00
CONTRIBUTING.md #1636 Get rid of Lombok in langchain4j-core (#1987) 2024-10-29 15:05:03 +01:00
LICENSE Initial commit 2023-06-20 17:30:29 +02:00
README.md docu: AI Services, structured outputs 2024-09-20 17:04:45 +02:00
mvnw Correctly configure Maven wrapper (#348) 2023-12-13 12:48:49 +01:00
mvnw.cmd [misc] Clean up maven wrapper scripts: have one at the root, delete the others. (#12) 2023-07-06 08:33:45 +02:00
pom.xml Maven modules depends on JDK (#1979) 2024-10-25 08:56:50 +02:00

README.md

LangChain for Java: Supercharge your Java application with the power of LLMs

Build Status Discord X Maven Version

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 and 15+ 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 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.

Getting Started

Getting started guide can be found here.

Code Examples

Please see examples of how LangChain4j can be used in langchain4j-examples repo:

Useful Materials

Useful materials can be found here.

Get Help

Please use Discord or GitHub discussions to get help.

Request Features

Please let us know what features you need by opening an issue.

Contribute

Contribution guidelines can be found here.