Commit Graph

53 Commits

Author SHA1 Message Date
LangChain4j 21d35e4434 changed version to 0.35.0-SNAPSHOT 2024-09-09 10:11:09 +02:00
LangChain4j b0a8e6f45b
Release 0.34.0 (#1711) 2024-09-05 16:49:39 +02:00
humcqc 673cf0c393
PgVector Jackson Migration (#1692)
PgVector Jackson Migration
Fixes https://github.com/langchain4j/langchain4j/issues/1684
2024-09-04 14:09:44 +02:00
LangChain4j 07f2f3ccbb cleanup 2024-08-23 10:21:01 +02:00
LangChain4j ae589e0c8d EmbeddingStoreWithRemovalIT: use awaitility 2024-08-20 11:58:20 +02:00
LangChain4j 1cccfdfa65 changed version to 0.34.0-SNAPSHOT 2024-07-26 15:12:26 +02:00
LangChain4j 822f09cb1c
Release 0.33.0 (#1514) 2024-07-25 10:12:20 +02:00
LangChain4j 8537e897ba
Fix split packages (#1433)
## Issue
Closes #1066

## Change
These are changes for each split package (each change was done in a
separate commit, so they can be reviewed in isolation):
- `dev.langchain4j.retriever` -> Moved `EmbeddingStoreRetriever` into
`langchain4j-core` module
- `dev.langchain4j.agent.tool` -> Moved `DefaultToolExecutor` and
`ToolExecutor` into `dev.langchain4j.service.tool` package
- `dev.langchain4j.classification` -> Moved `TextClassifier` into
`langchian4j` module
- `dev.langchain4j.chain` -> Moved `Chain` into `langchain4j` module
- `dev.langchain4j.model.embedding` -> [All in-process embedding models
should have unique package
name](https://github.com/langchain4j/langchain4j-embeddings/pull/33)
- `dev.langchain4j.model.output` -> Moved `OutputParser` and all it's
implementations into `dev.langchain4j.service.output` package of the
`langchain4j` module

More details can be found
[here](https://docs.google.com/spreadsheets/d/1U7f2MIfDgWA1tydPpzWpOGTHiBjBVZjsu0uZnXBT9qE/edit?usp=sharing).

## Breaking Changes
- All in-process ONNX model classes moved into their own unique
packages:
- `AllMiniLmL6V2EmbeddingModel` moved into
`dev.langchain4j.model.embedding.onnx.allminilml6v2`
- `AllMiniLmL6V2QuantizedEmbeddingModel` moved into
`dev.langchain4j.model.embedding.onnx.allminilml6v2q`
- `OnnxEmbeddingModel` moved into `dev.langchain4j.model.embedding.onnx`
package
  - etc
- `ToolExecutor` and `DefaultToolExecutor` moved into
`dev.langchain4j.service.tool` package
- Moved `OutputParser` and all it's implementations into
`dev.langchain4j.service.output` package of the `langchain4j` module
- Moved `Chain` into `langchain4j` module
- Moved `TextClassifier` into `langchian4j` module

## General checklist
- [ ] There are no breaking changes
- [ ] 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
<!-- Before adding documentation and example(s) (below), please wait
until the PR is reviewed and approved. -->
- [ ] 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-07-19 12:59:59 +02:00
LangChain4j fe50c88e77 changed version to 0.33.0-SNAPSHOT 2024-07-08 14:47:07 +02:00
LangChain4j c2366a226c
Release 0.32.0 (#1409) 2024-07-04 12:04:29 +02:00
humcqc dc0effe67e
[FEATURE] Metadata UUID Support (#1211)
[FEATURE] Metadata UUID Support #1164
2024-06-19 17:56:33 +02:00
LangChain4j 16e88df3c0 cleaned up EmbeddingStore removal functionality 2024-06-13 18:00:13 +02:00
Ruslan 2b2c09f05d
Implement remove methods for InMemoryEmbeddingStore (#1220)
## Issue
[https://github.com/langchain4j/langchain4j/issues/301](https://github.com/langchain4j/langchain4j/issues/301)

## Change
I've implemented remove methods for InMemoryEmbeddingStore.

Current problems:
1. I'm not completely sure how to test all of this. And, as I've seen,
you don't fully test it too)
2. There is a very nasty problem with `removeAll(Filter filter)` . Let
me try to break it in small pieces:
1. `EmbeddingStore`'s are parametrized with `Embedded` type parameter.
2. `removeAll(Filter filter)` method in `EmbeddingStore` accepts
`Filter`.
   3. `Filter` accepts `Metadata` object.
   4. `Metadata` object is stored in `TextSegment`.
5. `TextSegment` is usually what is `Embedded`. But it's not guaranteed.

How my pull request deals with this problem: 
1) for every entry in `InMemoryEmbeddingStore` check the type of
`Embedded`.
2) If it's a `TextSegment`, then proceed.
3) If it's not, then raise `UnsupportedOperationException`.
The issue with this strategy is that we perform the check for every
entry. I haven't found a way in Java to check the type of type parameter
(because it's erasured in runtime). (*In C++, for example, there are
`constexpr if`, `<type_traits>`, `std::is_same<U, V>`, explicit
specialization, etc.*)

We could solve this problem if `InMemoryEmbeddingStore` would support
only `TextSegment` as `Embedded`, but that's a breaking change.

I could also not implement this method, but, I really really need it in
my project (if we chose to stick with `InMemoryEmbeddingStore`).
  

## General checklist
<!-- Please double-check the following points and mark them like this:
[X] -->
- [x] There are no breaking changes
- [ ] I have added unit and integration tests for my change
- [ ] I have manually run all the unit and integration tests in the
module I have added/changed, and they are all green
- [ ] 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
<!-- Before adding documentation and example(s) (below), please wait
until the PR is reviewed and approved. -->
- [ ] 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)
2024-06-13 16:15:53 +02:00
LangChain4j a1b733d96d bumped version to 0.32.0-SNAPSHOT 2024-05-24 16:25:13 +02:00
LangChain4j d9cb1e9b81
Release 0.31.0 (#1151) 2024-05-23 17:40:52 +02:00
LangChain4j 358f63c0fa PGVector, remove by ID, same impl as #1020 but on top of last dev. (#1113)
#301: Add support for remove operations in EmbeddingStore (PGVector)
2024-05-23 11:53:42 +02:00
humcqc 13487864c7
PGVector, remove by ID, same impl as #1020 but on top of last dev. (#1113)
same impl as #1020 but on top of last dev.
2024-05-23 11:52:14 +02:00
LangChain4j 504aa173df
Experimental: RAG: SQL database content retriever (#1056)
## Issue
https://github.com/langchain4j/langchain4j/issues/232

## Change
An experimental `SqlDatabaseContentRetriever` has been added.

Simplest usage example:
```java
ContentRetriever contentRetriever = SqlDatabaseContentRetriever.builder()
    .dataSource(dataSource)
    .chatLanguageModel(openAiChatModel)
    .build();
```
In this case SQL dialect and table structure will be determined from the
`DataSource`.

But it can be customized:
```java
ContentRetriever contentRetriever = SqlDatabaseContentRetriever.builder()
    .dataSource(dataSource)
    .sqlDialect("PostgreSQL")
    .databaseStructure(...)
    .promptTemplate(...)
    .chatLanguageModel(openAiChatModel)
    .maxRetries(2)
    .build();
```

See `SqlDatabaseContentRetrieverIT` for a full example.

## General checklist
<!-- Please double-check the following points and mark them like this:
[X] -->
- [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
<!-- Before adding documentation and example(s) (below), please wait
until the PR is reviewed and approved. -->
- [ ] 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)


## Checklist for adding new model integration
<!-- Please double-check the following points and mark them like this:
[X] -->
- [X] I have added my new module in the
[BOM](https://github.com/langchain4j/langchain4j/blob/main/langchain4j-bom/pom.xml)
2024-05-21 16:49:02 +02:00
humcqc d25029e11e
Implement Metadata filtering on Pgvector with 3 implementations JSON, JSONB and Columns (#851)
Implement metadata filtering for PgVectorEmbeddingStore with 3 implementations: COLUMN_PER_KEY, COMBINED_JSON and COMBINED_JSONB

Related: https://github.com/quarkiverse/quarkus-langchain4j/pull/410
2024-04-30 16:28:58 +02:00
LangChain4j 66c338c135 changed version to 0.31.0-SNAPSHOT 2024-04-29 11:21:00 +02:00
LangChain4j 1a340893ec
Release 0.30.0 (#945) 2024-04-16 18:21:01 +02:00
LangChain4j d1d9b45adc bumped to 0.30.0-SNAPSHOT 2024-04-08 17:36:52 +02:00
LangChain4j 45b58ac993
released 0.29.1 (#857) 2024-03-28 16:42:45 +01:00
LangChain4j d1e3cc1693
Release 0.29.0 (#830) 2024-03-26 11:54:43 +01:00
Eddú Meléndez Gonzales 370fd0cd81
Update usage of PostgreSQLContainer with pgvector/pgvector image (#703)
Testcontainers PostgreSQL module accepts `pgvector/pgvector`
as a valid image since version 1.19.7.
2024-03-19 13:06:24 +01:00
LangChain4j 91db3d354a bumped to 0.29.0-SNAPSHOT 2024-03-14 13:31:28 +01:00
LangChain4j 90fe3040b9
released 0.28.0 (#735) 2024-03-11 20:08:55 +01:00
LangChain4j 1acb7a607f
EmbeddingStore (Metadata) Filter API (#610)
## New EmbeddingStore (metadata) `Filter` API
Many embedding stores, such as
[Pinecone](https://docs.pinecone.io/docs/metadata-filtering) and
[Milvus](https://milvus.io/docs/boolean.md) support strict filtering
(think of an SQL "WHERE" clause) during similarity search.
So, if one has an embedding store with movies, for example, one could
search not only for the most semantically similar movies to the given
user query but also apply strict filtering by metadata fields like year,
genre, rating, etc. In this case, the similarity search will be
performed only on those movies that match the filter expression.

Since LangChain4j supports (and abstracts away) many embedding stores,
there needs to be an embedding-store-agnostic way for users to define
the filter expression.

This PR introduces a `Filter` interface, which can represent both simple
(e.g., `type = "documentation"`) and composite (e.g., `type in
("documentation", "tutorial") AND year > 2020`) filter expressions in an
embedding-store-agnostic manner.

`Filter` currently supports the following operations:

- Comparison:
  - `IsEqualTo`
  - `IsNotEqualTo`
  - `IsGreaterThan`
  - `IsGreaterThanOrEqualTo`
  - `IsLessThan`
  - `IsLessThanOrEqualTo`
  - `IsIn`
  - `IsNotIn`

- Logical:
  - `And`
  - `Not`
  - `Or`

These operations are supported by most embedding stores and serve as a
good starting point. However, the list of operations will expand over
time to include other operations (e.g., `Contains`) supported by
embedding stores.

Currently, the DSL looks like this:
```java
Filter onlyDocs = metadataKey("type").isEqualTo("documentation");

Filter docsAndTutorialsAfter2020 = metadataKey("type").isIn("documentation", "tutorial").and(metadataKey("year").isGreaterThan(2020));
// or
Filter docsAndTutorialsAfter2020 = and(
    metadataKey("type").isIn("documentation", "tutorial"),
    metadataKey("year").isGreaterThan(2020)
);
```

## Filter expression as a `String`
Filter expression can also be specified as a `String`. This might be
necessary, for example, if the filter expression is generated
dynamically by the application or by the LLM (as in [self
querying](https://python.langchain.com/docs/modules/data_connection/retrievers/self_query/)).

This PR introduces a `FilterParser` interface with a simple `Filter
parse(String)` API, allowing for future support of multiple syntaxes (if
this will be required).

For the out-of-the-box filter syntax, ANSI SQL's `WHERE` clause is
proposed as a suitable candidate for several reasons:
- SQL is well-known among Java developers
- There is extensive tooling available for SQL (e.g., parsers)
- LLMs are pretty good at generating valid SQL, as there are tons of SQL
queries on the internet, which are included in the LLM training
datasets. There are also specialized LLMs that are trained for
text-to-SQL task, such as [SQLCoder](https://huggingface.co/defog).

The downside is that SQL's `WHERE` clause might not support all
operations and data types that could be supported in the future by
various embedding stores. In such case, we could extend it to a superset
of ANSI SQL `WHERE` syntax and/or provide an option to express filters
in the native syntax of the store.

An out-of-the-box implementation of the SQL `FilterParser` is provided
as a `SqlFilterParser` in a separate module
`langchain4j-embedding-store-filter-parser-sql`, using
[JSqlParser](https://github.com/JSQLParser/JSqlParser) under the hood.

`SqlFilterParser` can parse SQL "SELECT" (or just "WHERE" clause)
statement into a `Filter` object:
- `SELECT * FROM fake_table WHERE userId = '123-456'` ->
`metadataKey("userId").isEqualTo("123-456")`
- `userId = '123-456'`  ->  `metadataKey("userId").isEqualTo("123-456")`

It can also resolve `CURDATE()` and
`CURRENT_DATE`/`CURRENT_TIME`/`CURRENT_TIMESTAMP`:
`SELECT * FROM fake_table WHERE year = EXTRACT(YEAR FROM CURRENT_DATE`
-> `metadataKey("year").isEqualTo(LocalDate.now().getYear())`

## Changes in `Metadata` API
Until now, `Metadata` supported only `String` values. This PR expands
the list of supported value types to `Integer`, `Long`, `Float` and
`Double`. In the future, more types may be added (if needed).
The method `String get(String key)` will be deprecated later in favor
of:
- `String getString(String key)`
- `Integer getInteger(String key)`
- `Long getLong(String key)`
- etc

New overloaded `put(key, value)` methods are introduced to support more
value types:
- `put(String key, int value)`
- `put(String key, long value)`
- etc

## Changes in `EmbeddingStore` API
New method `search` is added that will become the main entry point for
search in the future. All `findRelevant` methods will be deprecated
later.
New `search` method accepts `EmbeddingSearchRequest` and returns
`EmbeddingSearchResult`.
`EmbeddingSearchRequest` contains all search criteria (e.g.
`maxResults`, `minScore`), including new `Filter`.
`EmbeddingSearchResult` contains a list of `EmbeddingMatch`.
```java
EmbeddingSearchResult search(EmbeddingSearchRequest request);
```

## Changes in `EmbeddingStoreContentRetriever` API
`EmbeddingStoreContentRetriever` can now be configured with a static
`filter` as well as dynamic `dynamicMaxResults`, `dynamicMinScore` and
`dynamicFilter` in the builder:
```java
ContentRetriever contentRetriever = EmbeddingStoreContentRetriever.builder()
                .embeddingStore(embeddingStore)
                .embeddingModel(embeddingModel)
                ...
                .maxResults(3)
                // or
                .dynamicMaxResults(query -> 3) // You can define maxResults dynamically. The value could, for example, depend on the query or the user associated with the query.
                ...
                .minScore(0.3)
                // or
                .dynamicMinScore(query -> 0.3)
                ...
                .filter(metadataKey("userId").isEqualTo("123-456")) // Assuming your TextSegments contain Metadata with key "userId"
                // or
                .dynamicFilter(query -> metadataKey("userId").isEqualTo(query.metadata().chatMemoryId().toString()))
                ...
                .build();
```
So now you can define `maxResults`, `minScore` and `filter` both
statically and dynamically (they can depend on the query, user, etc.).
These values will be propagated to the underlying `EmbeddingStore`.

##
["Self-querying"](https://python.langchain.com/docs/modules/data_connection/retrievers/self_query/)
This PR also introduces `LanguageModelSqlFilterBuilder` in
`langchain4j-embedding-store-filter-parser-sql` module which can be used
with `EmbeddingStoreContentRetriever`'s `dynamicFilter` to automatically
build a `Filter` object from the `Query` using language model and
`SqlFilterParser`.

For example:
```java
TextSegment groundhogDay = TextSegment.from("Groundhog Day", new Metadata().put("genre", "comedy").put("year", 1993));
TextSegment forrestGump = TextSegment.from("Forrest Gump", new Metadata().put("genre", "drama").put("year", 1994));
TextSegment dieHard = TextSegment.from("Die Hard", new Metadata().put("genre", "action").put("year", 1998));

// describe metadata keys as if they were columns in the SQL table
TableDefinition tableDefinition = TableDefinition.builder()
                .name("movies")
                .addColumn("genre", "VARCHAR", "one of [comedy, drama, action]")
                .addColumn("year", "INT")
                .build();

LanguageModelSqlFilterBuilder sqlFilterBuilder = new LanguageModelSqlFilterBuilder(model, tableDefinition);

ContentRetriever contentRetriever = EmbeddingStoreContentRetriever.builder()
                .embeddingStore(embeddingStore)
                .embeddingModel(embeddingModel)
                .dynamicFilter(sqlFilterBuilder::build)
                .build();

String answer = assistant.answer("Recommend me a good drama from 90s"); // Forrest Gump
```

## Which embedding store integrations will support `Filter`?
In the long run, all (provided the embedding store itself supports it).
In the first iteration, I aim to add support to just a few:
- `InMemoryEmbeddingStore`
- Elasticsearch
- Milvus

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Summary by CodeRabbit

- **New Features**
- Introduced filters for checking key's value existence in a collection
for improved data handling.
- **Enhancements**
- Updated `InMemoryEmbeddingStoreTest` to extend a different class for
improved testing coverage and added a new test method.
- **Refactor**
- Made minor formatting adjustments in the assertion block for better
readability.
- **Documentation**
  - Updated class hierarchy information for clarity.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-03-08 17:06:58 +01:00
dependabot[bot] 7fe7bedbdd
Bump org.postgresql:postgresql from 42.6.0 to 42.7.2 in /langchain4j-pgvector (#649)
Bumps [org.postgresql:postgresql](https://github.com/pgjdbc/pgjdbc) from
42.6.0 to 42.7.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/pgjdbc/pgjdbc/releases">org.postgresql:postgresql's
releases</a>.</em></p>
<blockquote>
<h2>v42.7.1</h2>
<h2>Fixed regressions since 42.7.0</h2>
<ul>
<li>Revert &quot;Use canonical DateStyle name (<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/2925">#2925</a>)&quot;
<a href="https://github.com/vlsi"><code>@​vlsi</code></a> (<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3035">#3035</a>)</li>
<li>Revert &quot;feat: support SET statements combining with other
queries with semicolon in PreparedStatement&quot; <a
href="https://github.com/vlsi"><code>@​vlsi</code></a> (<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3010">#3010</a>)</li>
<li>chore: use java.release=8 when building pgjdbc from the generated
source distribution <a
href="https://github.com/vlsi"><code>@​vlsi</code></a> (<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3038">#3038</a>),
the driver uses Java 8 methods only</li>
</ul>
<h2>Changes</h2>
<ul>
<li>Apply connectTimeout before SSLSocket.startHandshake to avoid
infinite wait in case the connection is broken <a
href="https://github.com/davecramer"><code>@​davecramer</code></a> (<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3040">#3040</a>)</li>
<li>perf: improve performance of PreparedStatement.setBlob,
BlobInputStream, and BlobOutputStream with dynamic buffer sizing <a
href="https://github.com/vlsi"><code>@​vlsi</code></a> (<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3044">#3044</a>)</li>
<li>fix: avoid timezone conversions when sending LocalDateTime to the
database <a href="https://github.com/vlsi"><code>@​vlsi</code></a> (<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/2852">#2852</a>)</li>
<li>fix: support waffle-jna 2.x and 3.x by using reflective approach for
ManagedSecBufferDesc <a
href="https://github.com/chrullrich"><code>@​chrullrich</code></a> (<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/2720">#2720</a>)</li>
</ul>
<h2>🧰 Maintenance</h2>
<ul>
<li>chore: bump Gradle to 8.5 <a
href="https://github.com/vlsi"><code>@​vlsi</code></a> (<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3045">#3045</a>)</li>
<li>chore: use Java 17 for building pgjdbc, and use --release 8 to
target Java 8, add tests with Java 21 and 22 <a
href="https://github.com/vlsi"><code>@​vlsi</code></a> (<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3026">#3026</a>)</li>
<li>fedora/rpm: move source build to java-17-openjdk-devel <a
href="https://github.com/praiskup"><code>@​praiskup</code></a> (<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3036">#3036</a>)</li>
<li>Update site 42 7 0 <a
href="https://github.com/davecramer"><code>@​davecramer</code></a> (<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3004">#3004</a>)</li>
<li>prepared for release 42.7.1 update changelogs <a
href="https://github.com/davecramer"><code>@​davecramer</code></a> (<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3037">#3037</a>)</li>
</ul>
<h2>⬆️ Dependencies</h2>
<!-- raw HTML omitted -->
<ul>
<li>fix(deps): update dependency
org.checkerframework:org.checkerframework.gradle.plugin to v0.6.36 <a
href="https://github.com/renovate-bot"><code>@​renovate-bot</code></a>
(<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3060">#3060</a>)</li>
<li>chore(deps): update plugin biz.aqute.bnd.builder to v7 <a
href="https://github.com/renovate-bot"><code>@​renovate-bot</code></a>
(<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3034">#3034</a>)</li>
<li>fix(deps): update dependency
com.github.spotbugs:com.github.spotbugs.gradle.plugin to v6 <a
href="https://github.com/renovate-bot"><code>@​renovate-bot</code></a>
(<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3056">#3056</a>)</li>
<li>fix(deps): update dependency
com.github.spotbugs:com.github.spotbugs.gradle.plugin to v5.2.5 <a
href="https://github.com/renovate-bot"><code>@​renovate-bot</code></a>
(<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3032">#3032</a>)</li>
<li>chore(deps): update codecov/codecov-action digest to b0466b4 <a
href="https://github.com/renovate-bot"><code>@​renovate-bot</code></a>
(<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3059">#3059</a>)</li>
<li>fix(deps): update checkerframework to v3.41.0 <a
href="https://github.com/renovate-bot"><code>@​renovate-bot</code></a>
(<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3058">#3058</a>)</li>
<li>fix(deps): update logback to v1.2.13 <a
href="https://github.com/renovate-bot"><code>@​renovate-bot</code></a>
(<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3053">#3053</a>)</li>
<li>chore(deps): update codecov/codecov-action digest to 438fa9e <a
href="https://github.com/renovate-bot"><code>@​renovate-bot</code></a>
(<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3051">#3051</a>)</li>
<li>fix(deps): update dependency spotbugs to v4.8.2 <a
href="https://github.com/renovate-bot"><code>@​renovate-bot</code></a>
(<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3052">#3052</a>)</li>
<li>chore: bump Gradle to 8.5 <a
href="https://github.com/vlsi"><code>@​vlsi</code></a> (<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3045">#3045</a>)</li>
<li>fix(deps): update dependency org.ops4j.pax.url:pax-url-aether to
v2.6.14 <a
href="https://github.com/renovate-bot"><code>@​renovate-bot</code></a>
(<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3030">#3030</a>)</li>
<li>chore(deps): update plugin org.nosphere.gradle.github.actions to
v1.4.0 <a
href="https://github.com/renovate-bot"><code>@​renovate-bot</code></a>
(<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3031">#3031</a>)</li>
<li>chore(deps): update dependency ubuntu to v22 <a
href="https://github.com/renovate-bot"><code>@​renovate-bot</code></a>
(<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3033">#3033</a>)</li>
<li>fix(deps): update checkerframework <a
href="https://github.com/renovate-bot"><code>@​renovate-bot</code></a>
(<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3027">#3027</a>)</li>
<li>fix(deps): update dependency spotbugs to v4.8.1 <a
href="https://github.com/renovate-bot"><code>@​renovate-bot</code></a>
(<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3023">#3023</a>)</li>
<li>fix(deps): update dependency uk.org.webcompere:system-stubs-jupiter
to v2.1.5 <a
href="https://github.com/renovate-bot"><code>@​renovate-bot</code></a>
(<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3024">#3024</a>)</li>
<li>fix(deps): update jmh to v1.37 <a
href="https://github.com/renovate-bot"><code>@​renovate-bot</code></a>
(<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3025">#3025</a>)</li>
<li>fix(deps): update dependency com.google.errorprone:error_prone_core
to v2.23.0 <a
href="https://github.com/renovate-bot"><code>@​renovate-bot</code></a>
(<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3022">#3022</a>)</li>
<li>fix(deps): update junit5 monorepo to v5.10.1 <a
href="https://github.com/renovate-bot"><code>@​renovate-bot</code></a>
(<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3015">#3015</a>)</li>
<li>chore(deps): update plugin com.github.burrunan.s3-build-cache to
v1.7 <a
href="https://github.com/renovate-bot"><code>@​renovate-bot</code></a>
(<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3016">#3016</a>)</li>
<li>chore(deps): update dependency com.typesafe.play:sbt-plugin to
v2.9.0 <a
href="https://github.com/renovate-bot"><code>@​renovate-bot</code></a>
(<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3021">#3021</a>)</li>
<li>fix(deps): update dependency checkstyle to v10.12.5 <a
href="https://github.com/renovate-bot"><code>@​renovate-bot</code></a>
(<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3020">#3020</a>)</li>
<li>chore(deps): update codecov/codecov-action digest to 920a494 <a
href="https://github.com/renovate-bot"><code>@​renovate-bot</code></a>
(<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3019">#3019</a>)</li>
<li>chore(deps): update actions/github-script action to v7 <a
href="https://github.com/renovate-bot"><code>@​renovate-bot</code></a>
(<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3018">#3018</a>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/pgjdbc/pgjdbc/blob/master/CHANGELOG.md">org.postgresql:postgresql's
changelog</a>.</em></p>
<blockquote>
<h1>Changelog</h1>
<p>Notable changes since version 42.0.0, read the complete <a
href="https://jdbc.postgresql.org/documentation/changelog.html">History
of Changes</a>.</p>
<p>The format is based on <a
href="http://keepachangelog.com/en/1.0.0/">Keep a Changelog</a>.</p>
<h2>[Unreleased]</h2>
<h3>Changed</h3>
<h3>Added</h3>
<ul>
<li>feat: Add PasswordUtil for encrypting passwords client side [PR <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3082">#3082</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/pull/3082">pgjdbc/pgjdbc#3082</a>)</li>
</ul>
<h3>Fixed</h3>
<h2>[42.7.1] (2023-12-06 08:34:00 -0500)</h2>
<h3>Changed</h3>
<ul>
<li>perf: improve performance of PreparedStatement.setBlob,
BlobInputStream, and BlobOutputStream with dynamic buffer sizing [PR <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3044">#3044</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/pull/3044">pgjdbc/pgjdbc#3044</a>)</li>
</ul>
<h3>Fixed</h3>
<ul>
<li>fix: Apply connectTimeout before SSLSocket.startHandshake to avoid
infinite wait in case the connection is broken [PR <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3040">#3040</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/pull/3040">pgjdbc/pgjdbc#3040</a>)</li>
<li>fix: support waffle-jna 2.x and 3.x by using reflective approach for
ManagedSecBufferDesc [PR <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/2720">#2720</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/pull/2720">pgjdbc/pgjdbc#2720</a>)
Fixes [Issue <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/2690">#2690</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/2720">pgjdbc/pgjdbc#2720</a>).</li>
<li>fix: NoSuchMethodError on ByteBuffer#position When Running on Java 8
when accessing arrays, fixes [Issue <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3014">#3014</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3014">pgjdbc/pgjdbc#3014</a>)</li>
<li>Revert &quot;[PR <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/2925">#2925</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/pull/2925">pgjdbc/pgjdbc#2925</a>)
Use canonical DateStyle name&quot; [PR <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3035">#3035</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/pull/3035">pgjdbc/pgjdbc#3035</a>)
Fixes [Issue <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3008">#3008</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3008">pgjdbc/pgjdbc#3008</a>)</li>
<li>Revert &quot;[PR #<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/2973">#2973</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/pull/2973">pgjdbc/pgjdbc#2973</a>)
feat: support SET statements combining with other queries with semicolon
in PreparedStatement&quot; [PR <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3010">#3010</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/pull/3010">pgjdbc/pgjdbc#3010</a>)
Fixes [Issue <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3007">#3007</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/3007">pgjdbc/pgjdbc#3007</a>)</li>
<li>fix: avoid timezone conversions when sending LocalDateTime to the
database <a
href="https://redirect.github.com/pgjdbc/pgjdbc/pull/3010">#2852</a>
Fixes [Issue <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/1390">#1390</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/1390">pgjdbc/pgjdbc#1390</a>)
,[Issue <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/2850">#2850</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/2850">pgjdbc/pgjdbc#2850</a>)
Closes [Issue <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/1391">#1391</a>(https://redirect.github.com/pgjdbc/pgjdbc/issues/1391)</li>
</ul>
<h2>[42.7.0] (2023-11-20 09:33:00 -0500)</h2>
<h3>Changed</h3>
<ul>
<li>fix: Deprecate for removal PGPoint.setLocation(java.awt.Point) to
cut dependency to <code>java.desktop</code> module. [PR <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/2967">#2967</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/pull/2967">pgjdbc/pgjdbc#2967</a>)</li>
<li>feat: return all catalogs for getCatalogs metadata query closes
[ISSUE <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/2949">#2949</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/2949">pgjdbc/pgjdbc#2949</a>)
[PR <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/2953">#2953</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/pull/2953">pgjdbc/pgjdbc#2953</a>)</li>
<li>feat: support SET statements combining with other queries with
semicolon in PreparedStatement [PR #<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/2973">#2973</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/pull/2973">pgjdbc/pgjdbc#2973</a>)</li>
</ul>
<h3>Fixed</h3>
<ul>
<li>chore: add styleCheck Gradle task to report style violations [PR <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/2980">#2980</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/pull/2980">pgjdbc/pgjdbc#2980</a>)</li>
<li>fix: Include currentXid in &quot;Error rolling back prepared
transaction&quot; exception message [PR <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/2978">#2978</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/pull/2978">pgjdbc/pgjdbc#2978</a>)</li>
<li>fix: add varbit as a basic type inside the TypeInfoCache [PR <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/2960">#2960</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/pull/2960">pgjdbc/pgjdbc#2960</a>)</li>
<li>fix: Fix failing tests for version 16. [PR <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/2962">#2962</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/pull/2962">pgjdbc/pgjdbc#2962</a>)</li>
<li>fix: allow setting arrays with ANSI type name [PR <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/2952">#2952</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/pull/2952">pgjdbc/pgjdbc#2952</a>)</li>
<li>feat: Use KeepAlive to confirm LSNs [PR <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/2941">#2941</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/pull/2941">pgjdbc/pgjdbc#2941</a>)</li>
<li>fix: put double ' around log parameter [PR <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/2936">#2936</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/pull/2936">pgjdbc/pgjdbc#2936</a>)
fixes [ISSUE <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/2935">#2935</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/2935">pgjdbc/pgjdbc#2935</a>)</li>
<li>fix: Fix Issue <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/2928">#2928</a>
number of ports not equal to number of servers in datasource [PR <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/2929">#2929</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/pull/2929">pgjdbc/pgjdbc#2929</a>)</li>
<li>fix: Use canonical DateStyle name (<a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/2925">#2925</a>)
fixes <a
href="https://redirect.github.com/pgbouncer/pgbouncer/issues/776">pgbouncer
issue</a></li>
<li>fix: Method getFastLong should be able to parse all longs [PR <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/2881">#2881</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/pull/2881">pgjdbc/pgjdbc#2881</a>)</li>
<li>docs: Fix typos in info.html [PR <a
href="https://redirect.github.com/pgjdbc/pgjdbc/issues/2860">#2860</a>](<a
href="https://redirect.github.com/pgjdbc/pgjdbc/pull/2860">pgjdbc/pgjdbc#2860</a>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/pgjdbc/pgjdbc/commits">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.postgresql:postgresql&package-manager=maven&previous-version=42.6.0&new-version=42.7.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/langchain4j/langchain4j/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-21 12:39:08 +01:00
LangChain4j 197b4af9d1 bumped version to 0.28.0-SNAPSHOT 2024-02-09 15:11:52 +01:00
LangChain4j c1462c087f
release 0.27.1 (#621) 2024-02-09 15:00:42 +01:00
LangChain4j ad2fd90f32 bumped version to 0.28.0-SNAPSHOT 2024-02-09 08:12:28 +01:00
LangChain4j a22d297104
Release 0.27.0 (#615) 2024-02-09 08:00:34 +01:00
Antonio Goncalves baac759766
Beautifying Maven output (#572)
Looking at the Maven output I thought it could benefit from a little
renaming. I just changed the `<name>` in the `pom.xml`, nothing more.
The output is like this at the moment:

![Screenshot 2024-01-30 at 16 26
53](https://github.com/langchain4j/langchain4j/assets/729277/940886d1-565e-416f-a58e-91f609fc0c00)

It could look like this if this PR is merged:

![Screenshot 2024-01-30 at 16 42
38](https://github.com/langchain4j/langchain4j/assets/729277/f8787af2-b869-4e95-90bd-72bce5622737)

Just a personal taste. Let me know if you like it or not (or want to
change it). If not, just discard it, it's fine ;o)
2024-01-30 16:54:54 +01:00
LangChain4j fca8ca48f7 bump version to 0.27.0-SNAPSHOT 2024-01-30 16:18:40 +01:00
LangChain4j 3958e01738
release 0.26.1 (#570) 2024-01-30 16:11:21 +01:00
LangChain4j 469699b944 bump version to 0.27.0-SNAPSHOT 2024-01-30 08:07:45 +01:00
LangChain4j a8ad9e48d9
Automate release (#562) 2024-01-30 07:20:20 +01:00
LangChain4j 9ba17b5dc8 PGVector: enable ITs 2024-01-26 23:40:23 +01:00
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 e1dddb33a2
bumped version to 0.25.0-SNAPSHOT (#369) 2023-12-19 13:03:48 +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
deep-learning-dynamo c694d2836c Use Testcontainers annotation (#310) 2023-12-04 17:40:35 +01:00
Eddú Meléndez Gonzales 3676b6d752
Use Testcontainers annotation (#310)
`@Container` is used along with `@Testcontainers` for initialization.
The current test has `PostgreSQLContainer` annotated with `@Container`
and it is manually initialized.
2023-12-04 17:39:17 +01:00
deep-learning-dynamo c3893897cf Fix PG Vector Index creation statement incorrect (#302) 2023-12-04 16:16:18 +01:00
Pascal Vantrepote 1a9f45ddb1
Fix PG Vector Index creation statement incorrect (#302)
Statement has been corrected:

```
                final String indexName = table + "_ivfflat_index";
                connection.createStatement().executeUpdate(String.format(
                        "CREATE INDEX IF NOT EXISTS %s ON %s " +
                                "USING ivfflat (embedding vector_cosine_ops) " +
                                "WITH (lists = %s)",
                        indexName, table, ensureGreaterThanZero(indexListSize, "indexListSize")));
```
2023-12-04 16:13:49 +01:00
LangChain4j ba7fabaa50
graal: cleanup (#297) 2023-11-19 12:59:24 +01:00
deep-learning-dynamo 09022d4a32 reducing duplication of *EmbeddingStoreIT 2023-11-18 20:15:46 +01:00
deep-learning-dynamo 16f60dbef9 reducing duplication of *EmbeddingStoreIT 2023-11-18 16:23:29 +01:00