diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index c8a1e2caf7a..9e66c908252 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -23,7 +23,7 @@ Please provide a relevant code snippets to reproduce this bug.
A clear and concise description of what you expected to happen.
**Please complete the following information:**
-- LangChain4j version: e.g. 0.17.0
+- LangChain4j version: e.g. 0.18.0
- Java version: e.g. 11
- Spring Boot version (if applicable): e.g. 2.7.13
diff --git a/README.md b/README.md
index efad4359b71..98985c77b02 100644
--- a/README.md
+++ b/README.md
@@ -20,6 +20,10 @@ This can be achieved thanks to:
## News
+26 July:
+- We've added integration with [LocalAI](https://localai.io/). Now, you can use LLMs hosted locally!
+- Added support for [response streaming in AI Services](https://github.com/langchain4j/langchain4j-examples/blob/main/other-examples/src/main/java/ServiceWithStreamingExample.java).
+
21 July:
- Now, you can do [text embedding inside your JVM](https://github.com/langchain4j/langchain4j-examples/blob/main/other-examples/src/main/java/InProcessEmbeddingModelExamples.java).
@@ -158,24 +162,25 @@ See example [here](https://github.com/langchain4j/langchain4j-examples/blob/main
## Getting started
-1. Add langchain4j dependency to your project:
+1. Add LangChain4j dependency to your project:
- Maven:
```
dev.langchain4j
langchain4j
- 0.17.0
+ 0.18.0
```
- Gradle:
```
- implementation 'dev.langchain4j:langchain4j:0.17.0'
+ implementation 'dev.langchain4j:langchain4j:0.18.0'
```
2. Import your OpenAI/HuggingFace API key:
```java
String apiKey = System.getenv("OPENAI_API_KEY");
```
+ You can use the API key "demo" to test OpenAI, which we provide for free.
[How to gen an API key?](https://github.com/langchain4j/langchain4j#how-to-get-an-api-key)
@@ -220,6 +225,10 @@ Please note that the library is in active development and:
- [Chats](https://huggingface.co/docs/api-inference/detailed_parameters#text-generation-task)
- [Completions](https://huggingface.co/docs/api-inference/detailed_parameters#text-generation-task)
- [Embeddings](https://huggingface.co/docs/api-inference/detailed_parameters#feature-extraction-task)
+- Integration with [LocalAI](https://localai.io/) for:
+ - Chats (sync + streaming + functions)
+ - Completions (sync + streaming)
+ - Embeddings
- [Memory for Chats](https://github.com/langchain4j/langchain4j-examples/blob/main/other-examples/src/main/java/ChatMemoryExamples.java)
- [Chat with Documents](https://github.com/langchain4j/langchain4j-examples/blob/main/other-examples/src/main/java/ChatWithDocumentsExamples.java)
- Integration with [Pinecone](https://docs.pinecone.io/docs/overview) embedding store
diff --git a/langchain4j-core/pom.xml b/langchain4j-core/pom.xml
index 195d291808c..a34fa7eccdf 100644
--- a/langchain4j-core/pom.xml
+++ b/langchain4j-core/pom.xml
@@ -7,7 +7,7 @@
dev.langchain4j
langchain4j-parent
- 0.17.0
+ 0.18.0
../langchain4j-parent/pom.xml
diff --git a/langchain4j-embeddings-all-minilm-l6-v2-q/pom.xml b/langchain4j-embeddings-all-minilm-l6-v2-q/pom.xml
index 4bf04c30104..618f038e1f6 100644
--- a/langchain4j-embeddings-all-minilm-l6-v2-q/pom.xml
+++ b/langchain4j-embeddings-all-minilm-l6-v2-q/pom.xml
@@ -7,7 +7,7 @@
dev.langchain4j
langchain4j-parent
- 0.17.0
+ 0.18.0
../langchain4j-parent/pom.xml
@@ -22,13 +22,13 @@
dev.langchain4j
langchain4j-core
- 0.17.0
+ 0.18.0
dev.langchain4j
langchain4j-embeddings
- 0.17.0
+ 0.18.0
diff --git a/langchain4j-embeddings-all-minilm-l6-v2/pom.xml b/langchain4j-embeddings-all-minilm-l6-v2/pom.xml
index cddf1effb66..9b78ce36096 100644
--- a/langchain4j-embeddings-all-minilm-l6-v2/pom.xml
+++ b/langchain4j-embeddings-all-minilm-l6-v2/pom.xml
@@ -7,7 +7,7 @@
dev.langchain4j
langchain4j-parent
- 0.17.0
+ 0.18.0
../langchain4j-parent/pom.xml
@@ -22,13 +22,13 @@
dev.langchain4j
langchain4j-core
- 0.17.0
+ 0.18.0
dev.langchain4j
langchain4j-embeddings
- 0.17.0
+ 0.18.0
diff --git a/langchain4j-embeddings-e5-small-v2-q/pom.xml b/langchain4j-embeddings-e5-small-v2-q/pom.xml
index a0657e4d6d2..cafb05108ab 100644
--- a/langchain4j-embeddings-e5-small-v2-q/pom.xml
+++ b/langchain4j-embeddings-e5-small-v2-q/pom.xml
@@ -7,7 +7,7 @@
dev.langchain4j
langchain4j-parent
- 0.17.0
+ 0.18.0
../langchain4j-parent/pom.xml
@@ -22,13 +22,13 @@
dev.langchain4j
langchain4j-core
- 0.17.0
+ 0.18.0
dev.langchain4j
langchain4j-embeddings
- 0.17.0
+ 0.18.0
diff --git a/langchain4j-embeddings-e5-small-v2/pom.xml b/langchain4j-embeddings-e5-small-v2/pom.xml
index 17802a14ffc..6224ab57722 100644
--- a/langchain4j-embeddings-e5-small-v2/pom.xml
+++ b/langchain4j-embeddings-e5-small-v2/pom.xml
@@ -7,7 +7,7 @@
dev.langchain4j
langchain4j-parent
- 0.17.0
+ 0.18.0
../langchain4j-parent/pom.xml
@@ -22,13 +22,13 @@
dev.langchain4j
langchain4j-core
- 0.17.0
+ 0.18.0
dev.langchain4j
langchain4j-embeddings
- 0.17.0
+ 0.18.0
diff --git a/langchain4j-embeddings/pom.xml b/langchain4j-embeddings/pom.xml
index 38345b53691..48bd0b8a0e5 100644
--- a/langchain4j-embeddings/pom.xml
+++ b/langchain4j-embeddings/pom.xml
@@ -7,7 +7,7 @@
dev.langchain4j
langchain4j-parent
- 0.17.0
+ 0.18.0
../langchain4j-parent/pom.xml
@@ -22,7 +22,7 @@
dev.langchain4j
langchain4j-core
- 0.17.0
+ 0.18.0
diff --git a/langchain4j-parent/pom.xml b/langchain4j-parent/pom.xml
index 4affd8ef856..900dfba4275 100644
--- a/langchain4j-parent/pom.xml
+++ b/langchain4j-parent/pom.xml
@@ -6,7 +6,7 @@
dev.langchain4j
langchain4j-parent
- 0.17.0
+ 0.18.0
pom
langchain4j parent POM
diff --git a/langchain4j-pinecone/pom.xml b/langchain4j-pinecone/pom.xml
index b5be8dd2f22..bc63e2b0d4a 100644
--- a/langchain4j-pinecone/pom.xml
+++ b/langchain4j-pinecone/pom.xml
@@ -7,7 +7,7 @@
dev.langchain4j
langchain4j-parent
- 0.17.0
+ 0.18.0
../langchain4j-parent/pom.xml
@@ -23,7 +23,7 @@
dev.langchain4j
langchain4j-core
- 0.17.0
+ 0.18.0
diff --git a/langchain4j-spring-boot-starter/pom.xml b/langchain4j-spring-boot-starter/pom.xml
index 265650ccd2e..138ef680f7b 100644
--- a/langchain4j-spring-boot-starter/pom.xml
+++ b/langchain4j-spring-boot-starter/pom.xml
@@ -7,7 +7,7 @@
dev.langchain4j
langchain4j-parent
- 0.17.0
+ 0.18.0
../langchain4j-parent/pom.xml
@@ -22,7 +22,7 @@
dev.langchain4j
langchain4j
- 0.17.0
+ 0.18.0
diff --git a/langchain4j/pom.xml b/langchain4j/pom.xml
index e4527cb6373..f730c67ab90 100644
--- a/langchain4j/pom.xml
+++ b/langchain4j/pom.xml
@@ -7,7 +7,7 @@
dev.langchain4j
langchain4j-parent
- 0.17.0
+ 0.18.0
../langchain4j-parent/pom.xml
@@ -24,7 +24,7 @@
dev.langchain4j
langchain4j-core
- 0.17.0
+ 0.18.0
diff --git a/langchain4j/src/main/java/dev/langchain4j/model/inprocess/InProcessEmbeddingModel.java b/langchain4j/src/main/java/dev/langchain4j/model/inprocess/InProcessEmbeddingModel.java
index fc216b13da1..2de034c7221 100644
--- a/langchain4j/src/main/java/dev/langchain4j/model/inprocess/InProcessEmbeddingModel.java
+++ b/langchain4j/src/main/java/dev/langchain4j/model/inprocess/InProcessEmbeddingModel.java
@@ -42,11 +42,11 @@ private static String getMessage(InProcessEmbeddingModelType type) {
+ "\n" +
" dev.langchain4j\n" +
" langchain4j-embeddings-%s\n" +
- " 0.17.0\n" +
+ " 0.18.0\n" +
"\n"
+ "\n"
+ "Gradle:\n"
- + "implementation 'dev.langchain4j:langchain4j-embeddings-%s:0.17.0'\n",
+ + "implementation 'dev.langchain4j:langchain4j-embeddings-%s:0.18.0'\n",
type.name(),
type.name().replace("_", "-").toLowerCase(),
type.name().replace("_", "-").toLowerCase()
diff --git a/langchain4j/src/main/java/dev/langchain4j/store/embedding/PineconeEmbeddingStore.java b/langchain4j/src/main/java/dev/langchain4j/store/embedding/PineconeEmbeddingStore.java
index f0aaeac6163..2fa1f6809f0 100644
--- a/langchain4j/src/main/java/dev/langchain4j/store/embedding/PineconeEmbeddingStore.java
+++ b/langchain4j/src/main/java/dev/langchain4j/store/embedding/PineconeEmbeddingStore.java
@@ -29,10 +29,10 @@ private static String getMessage() {
+ "\n" +
" dev.langchain4j\n" +
" langchain4j-pinecone\n" +
- " 0.17.0\n" +
+ " 0.18.0\n" +
"\n\n"
+ "Gradle:\n"
- + "implementation 'dev.langchain4j:langchain4j-pinecone:0.17.0'\n";
+ + "implementation 'dev.langchain4j:langchain4j-pinecone:0.18.0'\n";
}
private static EmbeddingStore loadDynamically(String implementationClassName, String apiKey, String environment, String projectName, String index, String nameSpace) throws ClassNotFoundException, NoSuchMethodException, InstantiationException, IllegalAccessException, InvocationTargetException {
diff --git a/pom.xml b/pom.xml
index dc4236faea4..5139f7e31b5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
dev.langchain4j
langchain4j-aggregator
- 0.17.0
+ 0.18.0
pom