Commit Graph

61 Commits

Author SHA1 Message Date
LangChain4j 7e5e82b7b2 updated to 0.26.0-SNAPSHOT 2023-12-22 18:08:19 +01:00
LangChain4j 2a5308b794 released 0.25.0 2023-12-22 18:02:04 +01:00
LangChain4j b04a502a1d
Replace Mustache templates with simple implementation to reduce transitive dependencies (#408)
One can provide their own prompt template implementation via SPI if
needed.
2023-12-22 14:24:00 +01:00
LangChain4j b51f5f99da
fixed pinecone client CVEs (#409) 2023-12-22 14:02:40 +01:00
Julien Dubois f4d87e2e5a
Add support for the 3 authentication methods to Azure OpenAI (#375)
- Using a key to Azure OpenAI
- Using a key to non-Azure OpenAI
- Using Azure Active Directory to connect to Azure OpenAI
2023-12-22 13:20:20 +01:00
LangChain4j 6ca2790e53
OpenAI: added missing parameters (logit_bias, response_format, seed, user) (#374) 2023-12-21 12:20:45 +01:00
LangChain4j 798a4742ac
Removed Spring Boot starters (#361)
They are moved to a separate repo: https://github.com/langchain4j/langchain4j-spring
2023-12-21 09:31:37 +01:00
ZYinNJU 17edd7b50c
Integration with ChatGLM (#360)
support [chatglm](https://github.com/THUDM/ChatGLM-6B), which was
mentioned in #267 .

[chatglm2](https://github.com/THUDM/ChatGLM2-6B) and
[chatglm3](https://github.com/THUDM/ChatGLM3) api are compatible with
openai, so It is enough to support chatglm.

because chatglm does not have official docker image, so I don't know how
to use `Testcontainers` to do test. (I'm not familiar with
`Testcontainers`, so for now I have to copy test from the other modules,
lol). The test will update using `Testcontainers` after I learn about it
in few days.
2023-12-19 15:09:50 +01:00
LangChain4j e1dddb33a2
bumped version to 0.25.0-SNAPSHOT (#369) 2023-12-19 13:03:48 +01:00
Eric Deandrea c2ab781adb
Allow for specifying the organization id in the configuration (#364)
Allow the organizationId to be specified in the configuration. See
https://platform.openai.com/docs/api-reference/organization-optional

Right now there is no way to specify this.

I added a `.organizationId(System.getenv("OPENAI_ORGANIZATION_ID"))` to
the builders in a bunch of the tests. They should have no effect other
than if you want to run the tests to pass an organizationId, you can
just set the `OPENAI_ORGANIZATION_ID` environment variable. The
`OpenAiClient` won't do anything if the `organizationId` is `null`.

Happy for questions/comments.

Fixes #344
2023-12-18 16:54:46 +01:00
LangChain4j 3731f3326f
Extract document loaders and parsers into separate modules (#354)
- extract PDF, POI document parsers into separate modules
- extract and simplify S3 document loader into a separate module
2023-12-18 16:32:22 +01:00
Julien Dubois 55a36c9f00
Migrate to the new Azure OpenAI 1.0.0-beta.6 SDK (#356)
Azure OpenAI 1.0.0-beta.6 is out:

- [x] Update to the new SDK
- [x] Add unit tests
- [x] Do integration tests on my account (as I have access to Azure
OpenAI)
2023-12-15 11:05:09 +01:00
Julien Dubois 3c0943d38b
Support Java 21 (#336)
This PR is to fix #335
2023-12-12 19:16:41 +01:00
LangChain4j 303b2ab7b5
OpenAI: Support parallel tool calling (#338)
This PR introduces a support for [parallel tool
calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling)
in OpenAI integration.
2023-12-08 17:29:56 +01:00
Julien Dubois 09ab6a1dda
Migration of the AzureOpenAiChatModel to use the Azure OpenAI SDK (#328)
This PR fixes https://github.com/langchain4j/langchain4j/issues/325

- [x] Migrate AzureOpenAiChatModel
- [x] Migrate AzureOpenAiEmbeddingModel
- [x] Migrate AzureOpenAiLanguageModel
- [x] Migrate AzureOpenAiStreamingChatModel
- [x] Migrate AzureOpenAiStreamingLanguageModel
- [x] Add a full suite of tests
2023-12-08 10:51:26 +01:00
LangChain4j ba7fabaa50
graal: cleanup (#297) 2023-11-19 12:59:24 +01:00
deep-learning-dynamo e467beb64a reducing duplication of *EmbeddingStoreIT 2023-11-18 19:20:26 +01:00
deep-learning-dynamo 00c6068de3 reducing duplication of *EmbeddingStoreIT 2023-11-18 18:29:44 +01:00
deep-learning-dynamo 16f60dbef9 reducing duplication of *EmbeddingStoreIT 2023-11-18 16:23:29 +01:00
LangChain4j ff998ac82d
build most modules with jdk 8 (#295)
Since we target java 8, CI build was updated to run most modules using
java 8, then modules requiring java 11 separately with java 11
2023-11-18 15:07:11 +01:00
deep-learning-dynamo 61e6a4bef0 added another variation of apache 2 license naming 2023-11-18 11:44:38 +01:00
Eddú Meléndez Gonzales 111c213c06
Cleanup Testcontainers deps (#292)
* Update testcontainers version to 1.19.2
* Remove duplicated entries in dependencyManagement section
* Import testcontainers-bom
2023-11-18 10:20:16 +01:00
deep-learning-dynamo 21dfc8b317 released 0.24.0 2023-11-12 18:58:31 +01:00
Joris Kuipers bc8ee67035
Add support for autocompletion of Boot configuration properties (#240)
By adding an optional dependency on the
spring-boot-configuration-processor, a
`META-INF/spring-configuration-metadata.json` file will be created for
all `@ConfigurationProperties`-annoted types to support autocompletion
within IDEs. Since nested beans are used, the bound fields for those
beans need to be annotated with `@NestedConfigurationProperty`. (purely
for this tool, this does not affect runtime behavior in any way)
2023-11-07 18:53:35 +01:00
deep-learning-dynamo 822469d4a0 fixed scopes 2023-10-27 14:18:14 +02:00
Jansen Ang 053a35d5a3
Add support for loading documents from s3 (#197)
Adding two separate loaders that load a single document or multiple
documents from S3 respectively. They also contain different parameters
to support different configurations. However, the document type is
dependent on the current parsers that langchain4j supports, but I am
planning to help in adding more parsers in the future.
2023-10-27 14:00:16 +02:00
Thomas Vitale 65ef6554b6
Include metadata for custom Spring Boot properties (#251)
Add the Spring Boot Configuration Processor dependency to the Spring
Boot starter to generate metadata
about the LangChain4J custom properties.

Fixes gh-250
2023-10-27 13:53:17 +02:00
deep-learning-dynamo d0067e9f91 updated openai4j to the latest version 2023-10-23 11:23:50 +02:00
deep-learning-dynamo f43cc8f4ca keep netty versions in sync 2023-10-17 21:16:18 +02:00
deep-learning-dynamo eef1796963 fixing build 2023-10-09 13:09:25 +02:00
Ricardo Ferreira 79b825df63
Add Support for OpenSearch as Embedding Store (#208)
This PR contains the implementation of an integration with
[OpenSearch](https://opensearch.org/). As one of the growing vector
databases in the open source world, adding support for it to this
project makes total sense. This implementation includes:

1. A complete implementation of the `EmbeddingStore` interface.
2. Unit tests for the major use cases a store must implement correctly.
3. Usage of [TestContainers](https://testcontainers.com/) to automate
the execution of backends.
2023-10-09 11:45:27 +02:00
Simon Verhoeven 4dc3e6d2b3
feat: upgrade Lombok to 1.8.30 for JDK21 compatibility (#211)
Using 1.8.28 results in 

` java: java.lang.NoSuchFieldError: Class
com.sun.tools.javac.tree.JCTree$JCImport does not have member field
'com.sun.tools.javac.tree.JCTree qualid'`
2023-10-09 10:02:14 +02:00
deep-learning-dynamo 1c7eb6edd1 skipping compliance check for langchain4j-cassandra due to "Public Domain" license of org.json:json 2023-10-09 09:13:00 +02:00
deep-learning-dynamo b822e68150 added another variation of Apache 2 license name to acceptable licenses 2023-10-09 08:58:02 +02:00
deep-learning-dynamo 315eab8641 released 0.23.0 2023-09-29 14:27:51 +02:00
ZYinNJU 887120b409
Redis integration as embedding store (#174) 2023-09-26 09:29:08 +02:00
LangChain4j ed854871d4
Extracted model providers to separate modules (#190) 2023-09-24 20:11:09 +02:00
LangChain4j 118306fdba
Moved Chroma integration to a separate module (#178) 2023-09-17 16:51:11 +02:00
ZYinNJU 3bffc971df
Integration with Elastic (#95)
I've done integration with Elastic and do some local test to ensure it's
right!(some logic is translated from LangChain Python to Java).

Elasticsearch do not support `Gson`. So we must have `Jackson`
dependency.
2023-09-02 20:32:46 +02:00
deep-learning-dynamo c1cc5be1c7 released 0.22.0 2023-08-29 19:21:56 +02:00
LangChain4j bebfc78ee1
Re-implemented document splitters (#130) 2023-08-28 21:33:48 +02:00
LangChain4j 20753a980a
Added EmbeddingModelTextClassifier (#139) 2023-08-28 21:19:11 +02:00
jiangsier-xyz e0487baaa2
Make the langchain4j-dashscope pass the license compliance check (#111)
Note that the declaration of license in dashscope-sdk-java:pom.xml is:

<licenses>
    <license>
        <name>The Apache License, Version 2.0</name>
        <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
        <distribution>repo</distribution>
    </license>
</licenses>

(There is a "The " prefix in its name.)
2023-08-20 20:09:06 +02:00
deep-learning-dynamo db1f236ed2 released 0.21.0 2023-08-19 15:57:39 +02:00
kuraleta da45b7e259
Integration with Azure (#107) 2023-08-18 20:55:51 +02:00
jiangsier-xyz d908f5158a
Integrate the Qwen series models via dashscope-sdk. (#99)
Qwen series models are provided by Alibaba Cloud. They are much better
in Asia languages then other LLMs.

DashScope is a model service platform. Qwen models are its primary
supported models. But it also supports other series like LLaMA2, Dolly,
ChatGLM, BiLLa(based on LLaMA)...These may be integrated sometime in the
future.
2023-08-18 20:49:50 +02:00
deep-learning-dynamo d7b96ca9a6 released 0.20.0 2023-08-14 00:44:07 +02:00
deep-learning-dynamo 1541f214c1 released 0.19.0 2023-08-10 14:34:21 +02:00
LangChain4j 16a84a9074
[Snyk] Upgrade org.projectlombok:lombok from 1.18.26 to 1.18.28 (#74)
authored-by: snyk-bot <snyk-bot@snyk.io>
2023-08-10 08:49:04 +02:00
LangChain4j edc8400dff
[Snyk] Upgrade org.apache.pdfbox:pdfbox from 2.0.28 to 2.0.29 (#73)
Co-authored-by: snyk-bot <snyk-bot@snyk.io>
2023-08-10 08:46:16 +02:00