Skip to content

Commit

Permalink
released 0.18.0
Browse files Browse the repository at this point in the history
  • Loading branch information
deep-learning-dynamo committed Jul 26, 2023
1 parent b9930e8 commit d4fca65
Show file tree
Hide file tree
Showing 15 changed files with 40 additions and 31 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand Down Expand Up @@ -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:
```
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j</artifactId>
<version>0.17.0</version>
<version>0.18.0</version>
</dependency>
```
- 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)
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion langchain4j-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-parent</artifactId>
<version>0.17.0</version>
<version>0.18.0</version>
<relativePath>../langchain4j-parent/pom.xml</relativePath>
</parent>

Expand Down
6 changes: 3 additions & 3 deletions langchain4j-embeddings-all-minilm-l6-v2-q/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-parent</artifactId>
<version>0.17.0</version>
<version>0.18.0</version>
<relativePath>../langchain4j-parent/pom.xml</relativePath>
</parent>

Expand All @@ -22,13 +22,13 @@
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-core</artifactId>
<version>0.17.0</version>
<version>0.18.0</version>
</dependency>

<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-embeddings</artifactId>
<version>0.17.0</version>
<version>0.18.0</version>
</dependency>

<dependency>
Expand Down
6 changes: 3 additions & 3 deletions langchain4j-embeddings-all-minilm-l6-v2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-parent</artifactId>
<version>0.17.0</version>
<version>0.18.0</version>
<relativePath>../langchain4j-parent/pom.xml</relativePath>
</parent>

Expand All @@ -22,13 +22,13 @@
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-core</artifactId>
<version>0.17.0</version>
<version>0.18.0</version>
</dependency>

<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-embeddings</artifactId>
<version>0.17.0</version>
<version>0.18.0</version>
</dependency>

<dependency>
Expand Down
6 changes: 3 additions & 3 deletions langchain4j-embeddings-e5-small-v2-q/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-parent</artifactId>
<version>0.17.0</version>
<version>0.18.0</version>
<relativePath>../langchain4j-parent/pom.xml</relativePath>
</parent>

Expand All @@ -22,13 +22,13 @@
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-core</artifactId>
<version>0.17.0</version>
<version>0.18.0</version>
</dependency>

<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-embeddings</artifactId>
<version>0.17.0</version>
<version>0.18.0</version>
</dependency>

<dependency>
Expand Down
6 changes: 3 additions & 3 deletions langchain4j-embeddings-e5-small-v2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-parent</artifactId>
<version>0.17.0</version>
<version>0.18.0</version>
<relativePath>../langchain4j-parent/pom.xml</relativePath>
</parent>

Expand All @@ -22,13 +22,13 @@
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-core</artifactId>
<version>0.17.0</version>
<version>0.18.0</version>
</dependency>

<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-embeddings</artifactId>
<version>0.17.0</version>
<version>0.18.0</version>
</dependency>

<dependency>
Expand Down
4 changes: 2 additions & 2 deletions langchain4j-embeddings/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-parent</artifactId>
<version>0.17.0</version>
<version>0.18.0</version>
<relativePath>../langchain4j-parent/pom.xml</relativePath>
</parent>

Expand All @@ -22,7 +22,7 @@
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-core</artifactId>
<version>0.17.0</version>
<version>0.18.0</version>
</dependency>

<dependency>
Expand Down
2 changes: 1 addition & 1 deletion langchain4j-parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-parent</artifactId>
<version>0.17.0</version>
<version>0.18.0</version>
<packaging>pom</packaging>

<name>langchain4j parent POM</name>
Expand Down
4 changes: 2 additions & 2 deletions langchain4j-pinecone/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-parent</artifactId>
<version>0.17.0</version>
<version>0.18.0</version>
<relativePath>../langchain4j-parent/pom.xml</relativePath>
</parent>

Expand All @@ -23,7 +23,7 @@
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-core</artifactId>
<version>0.17.0</version>
<version>0.18.0</version>
</dependency>

<dependency>
Expand Down
4 changes: 2 additions & 2 deletions langchain4j-spring-boot-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-parent</artifactId>
<version>0.17.0</version>
<version>0.18.0</version>
<relativePath>../langchain4j-parent/pom.xml</relativePath>
</parent>

Expand All @@ -22,7 +22,7 @@
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j</artifactId>
<version>0.17.0</version>
<version>0.18.0</version>
</dependency>

<dependency>
Expand Down
4 changes: 2 additions & 2 deletions langchain4j/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-parent</artifactId>
<version>0.17.0</version>
<version>0.18.0</version>
<relativePath>../langchain4j-parent/pom.xml</relativePath>
</parent>

Expand All @@ -24,7 +24,7 @@
<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-core</artifactId>
<version>0.17.0</version>
<version>0.18.0</version>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ private static String getMessage(InProcessEmbeddingModelType type) {
+ "<dependency>\n" +
" <groupId>dev.langchain4j</groupId>\n" +
" <artifactId>langchain4j-embeddings-%s</artifactId>\n" +
" <version>0.17.0</version>\n" +
" <version>0.18.0</version>\n" +
"</dependency>\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()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ private static String getMessage() {
+ "<dependency>\n" +
" <groupId>dev.langchain4j</groupId>\n" +
" <artifactId>langchain4j-pinecone</artifactId>\n" +
" <version>0.17.0</version>\n" +
" <version>0.18.0</version>\n" +
"</dependency>\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<TextSegment> loadDynamically(String implementationClassName, String apiKey, String environment, String projectName, String index, String nameSpace) throws ClassNotFoundException, NoSuchMethodException, InstantiationException, IllegalAccessException, InvocationTargetException {
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j-aggregator</artifactId>
<version>0.17.0</version>
<version>0.18.0</version>
<packaging>pom</packaging>

<modules>
Expand Down

0 comments on commit d4fca65

Please sign in to comment.