Commit Graph

61 Commits

Author SHA1 Message Date
Konstantin Pavlov 3ff4cd1e04
#1929 tinylog level surefire (#1955)
## Issue
Fixes #1929

## Change

- Set `tinylog.level=info` in the `surefire` and `failsafe` plugin
system properties. Remove tinilog property from `jvm.config`
- Set explicit `maven-deploy-plugin` version in the aggregator
- Remove redundant explicit dependency versions with
[openrewrite](https://docs.openrewrite.org/recipes/maven/removeredundantdependencyversions)

### Dependency Version Updates:

* Updated the `maven-deploy-plugin` version to `3.1.3` in
`langchain4j-parent/pom.xml` and `pom.xml`.
[[1]](diffhunk://#diff-db1dfc1ccffac6c8f8ae2414e6aad535940aaf08a488d30941157dc53ec573b0L469-R470)
[[2]](diffhunk://#diff-9c5fb3d1b7e3b0f54bc5c4182965c4fe1f9023d449017cece3005d3f90e8e4d8R119-R121)
* Updated the `maven-surefire-plugin` version to `3.3.1` and added a
configuration for `tinylog.level` in `langchain4j-parent/pom.xml`.
* Updated the `maven-failsafe-plugin` version to `3.3.1` and added a
configuration for `tinylog.level` in `langchain4j-parent/pom.xml`.

### Plugin Configuration Changes:

* Removed the `maven-failsafe-plugin` configuration from
`langchain4j-parent/pom.xml`.
* Removed specific version tags for dependencies in multiple `pom.xml`
files, such as `langchain4j-cassandra/pom.xml`,
`langchain4j-easy-rag/pom.xml`, and others.
[[1]](diffhunk://#diff-2a7ac31c7ee7ca4842a1502363449f7e8fdcd1bbe03f904229b80bfe5b693a83L35)
[[2]](diffhunk://#diff-12719e04c48f3263f90134aa98b8f63c2dcac5ffc06b2877baaf36e29f0ab4c1L28)
etc.)

### Other Changes:

* Added `-Djava.awt.headless=true` to `.mvn/jvm.config`.
* Added a comment for dependency versions in
`langchain4j-parent/pom.xml`.
* Removed a TODO comment in `.github/workflows/main.yaml`.

These changes aim to streamline dependency management and plugin
configurations, ensuring consistency and reducing potential conflicts.

## 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)
- [ ] I have added/updated [Spring Boot
starter(s)](https://github.com/langchain4j/langchain4j-spring) (if
applicable)


## Checklist for adding new maven module
<!-- Please double-check the following points and mark them like this:
[X] -->
- [ ] I have added my new module in the root `pom.xml` and
`langchain4j-bom/pom.xml`


## Checklist for adding new embedding store integration
<!-- Please double-check the following points and mark them like this:
[X] -->
- [ ] I have added a `{NameOfIntegration}EmbeddingStoreIT` that extends
from either `EmbeddingStoreIT` or `EmbeddingStoreWithFilteringIT`
- [ ] I have added a `{NameOfIntegration}EmbeddingStoreRemovalIT` that
extends from `EmbeddingStoreWithRemovalIT`

## Checklist for changing existing embedding store integration
<!-- Please double-check the following points and mark them like this:
[X] -->
- [ ] I have manually verified that the
`{NameOfIntegration}EmbeddingStore` works correctly with the data
persisted using the latest released version of LangChain4j
2024-10-21 10:29:32 +02:00
Konstantin Pavlov e7256f7b81
#1506 refactor enforcer plugin (#1923)
## Issue
Contributes to #1506 

## Change
This pull request involves the moving of the Maven Enforcer Plugin to
langchain4j-parent and the addition of a temporary property to skip
dependency convergence checks across multiple `pom.xml` files.

Enforcer plugin contains following rules enabled by default:
- [Require Maven version
3.8+](https://maven.apache.org/enforcer/enforcer-rules/requireMavenVersion.html)
-
[dependencyConvergence](https://maven.apache.org/enforcer/enforcer-rules/dependencyConvergence.html)
-
[banDuplicatePomDependencyVersions](https://maven.apache.org/enforcer/enforcer-rules/banDuplicatePomDependencyVersions.html)
- Planned, but failing right now:
[requireUpperBoundDeps](https://maven.apache.org/enforcer/enforcer-rules/requireUpperBoundDeps.html)


The change can be tested locally with `mvn validate` command.

## 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)
- [ ] I have added/updated [Spring Boot
starter(s)](https://github.com/langchain4j/langchain4j-spring) (if
applicable)
2024-10-16 17:38:47 +02:00
LangChain4j c6f4277916
New low-level API to specify tool parameters (#1668)
## Issue
Closes #896
Fixes #1480
Fixes #1881
Fixes #1858
Fixes #1865

## Context
Schema for tool parameters in the low-level API (`ChatLanguageModel` +
`ToolSpecification`) is currently specified using `ToolParameters` and
`JsonSchemaProperty` classes. This API works fine for simple cases, but
it does not work well for more complicated cases (e.g., when nested
objects or collections or recursion is required).

Moreover, [Structured
Outputs](https://github.com/langchain4j/langchain4j/pull/1590) feature
is using another API and a lot of logic between tools and structured
outputs is duplicated and out of sync.


## Change
`ToolParameters` and `JsonSchemaProperty` classes are now deprecated in
favour of new `JsonSchemaElement` API (which is used for Structured
Outputs as well). Most of the logic between this 2 features is now
unified.

`JsonSchemaElement` represents a schema for a JSON element. It can be of
such types:
- `JsonArraySchema`
- `JsonBooleanSchema`
- `JsonEnumSchema`
- `JsonIntegerSchema`
- `JsonNumberSchema`
- `JsonObjectSchema`
- `JsonReferenceSchema`
- `JsonStringSchema`

All model providers that support tools (see the list below) were updated
to support the new API. Old API is still supported for backward
compatibility, but will be removed in the future.

`ToolSpecifications` helper class now generates `ToolSpecification`s
using the new API only.

Example of the new API:
```java
ToolSpecification.builder()
    .name("weather")
    .description("Returns the current weather in the specified city")
    .parameters(JsonObjectSchema.builder()
        .addStringProperty("city", s -> s.description("The name of the city, e.g., Munich"))
        .addEnumProperty("units", TemperatureUnit.class)
        .required("city") // the required properties should be specified explicitly
        .build())
    .build();
```

`JsonObjectSchema` builder has some helper methods to make it easier to
add properties (e.g., `addProperty`, `addStringProperty`,
`addIntegerProperty`, etc.), but properties can also be specified using
a map:
```java
ToolSpecification.builder()
    .name("weather")
    .description("Returns the current weather in the specified city")
    .parameters(JsonObjectSchema.builder()
        .properties(Map.of(
            "city", JsonStringSchema.builder().description("The name of the city, e.g., Munich").build(),
            "units", JsonEnumSchema.builder().enumValues("CELSIUS", "FAHRENHEIT").build()
        ))
        .required("city") // the required properties should be specified explicitly
        .build())
    .build();
```

### Providers that support new `JsonSchemaElement` for tools
- [x] Amazon Bedrock
- [X] Anthropic
- [X] Azure OpenAI
- [X] DashScope
- [x] GitHub Models
- [X] Google AI Gemini
- [X] Google Vertex AI Gemini
- [x] Jlama
- [x] LocalAI
- [X] Mistral AI
- [X] Ollama
- [X] OpenAI
- [x] Qianfan
- [x] Zhipu AI

### Tested Providers
- [x] Amazon Bedrock
- [x] Anthropic
- [x] Azure OpenAI
- [x] DashScope
- [x] GitHub Models
- [x] Google AI Gemini
- [x] Google Vertex AI Gemini
- [x] Jlama
- [ ] LocalAI
- [x] Mistral AI
- [x] Ollama
- [x] OpenAI
- [x] Qianfan
- [x] Zhipu AI

### Additional Changes
Several bugs have been fixed along the way (see the list of Github
issues on the top).

### Breaking changes
- `ToolSpecification.parameters()` method has been renamed into
`toolParameters()`

### Potentially breaking changes
- `ToolSpecifications` helper class now generates `ToolSpecification`s
with parameters defined using the new API (`JsonObjectSchema`) instead
of the old API (`ToolParameters`).
- If `@Tool` does not have a description (`value` annotation attribute),
`ToolSpecifications` will return `ToolSpecification` with `description()
== null`

## General checklist
- [ ] There are no breaking changes (Most of the use cases should not
break)
- [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. -->
- [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-16 13:30:58 +02:00
Tim te Beek e199c6b2e6
Apply additional AssertJ best practices since #673 (#1904)
## Issue
- Follows https://github.com/langchain4j/langchain4j/pull/673

## Change
Apply best practices once more, as time had passed between when #673 was
opened and today. By clearing out any recipe suggestions on the main
branch we ensure any new suggestions on PRs are limited to changed
files.

## 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
- [ ] 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)
2024-10-14 16:34:09 +02:00
LangChain4j 6a0ec92ec4 do not log video content in tests 2024-10-11 09:46:25 +02:00
LangChain4j bdfe769e69 do not log images 2024-10-09 10:34:04 +02:00
LangChain4j 11855157dd updated version to 0.36.0-SNAPSHOT 2024-09-25 15:23:52 +02:00
LangChain4j 79f03dff36
Release 0.35.0 (#1829) 2024-09-25 13:16:03 +02:00
Guillaume Laforge c9995ab3e8
Flaky tests (#1823) 2024-09-24 16:34:48 +02:00
Guillaume Laforge 6bd851fefc
fix(Google AI Gemini) — Fixed wrong mapping between function execution requests and function execution responses. (#1802)
Added a test using `AiServices`.
Function execution requests were mapped to function execution responses.
2024-09-23 12:29:57 +02:00
LangChain4j c872a4d46c fixing failing tests 2024-09-23 10:01:44 +02:00
LangChain4j 3525027f57 fixing failing tests 2024-09-19 10:56:20 +02:00
Guillaume Laforge cb5bdd92e7
Google AI — add support for embedding model and ability to count tokens (#1786)
## Issue
Closes #1785
Closes #1784

## Change
* `GoogleAiChatModel` now implements `TokenCountEstimator`
* new `GoogleAiEmbeddingModel` class
* new `GoogleAiGeminiTokenizer` class

## 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
- [ ] 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-09-18 12:41:29 +02:00
ZYinNJU 16f410c788
Ollama chat model listener (#1765)
## Issue
Closes #1756
Closes #1750

## Change
1. `OllamaChatModel` and `OllamaStreamingChatModel` support
`ChatListener`
2. Fix `OllamaStreamingLanguageModel` throws `EOFException` when the
response content is too long.

## 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)
- [ ] I have added/updated [Spring Boot
starter(s)](https://github.com/langchain4j/langchain4j-spring) (if
applicable)
2024-09-17 11:12:43 +02:00
LangChain4j 07ce173fb3 fixed failing tests 2024-09-17 10:20:59 +02:00
Guillaume Laforge 6be0852b26
feat(Vertex AI Gemini) — listener support (streaming and non streaming) (#1779)
Fixes #1758

## Change

Add listener support to both Vertex AI Gemini streaming and non
streaming models.

## 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
- [X] 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)
- [ ] I have added/updated [Spring Boot
starter(s)](https://github.com/langchain4j/langchain4j-spring) (if
applicable)
2024-09-16 17:30:37 +02:00
Guillaume Laforge 858cc9c19d
Google AI Gemini — support for Enum structured output (#1741)
## Change

In addition to `application/json`, Gemini also supports `text/x.enum` as
a structured output format, which is great for classification.

This PR covers both Google Vertex AI Gemini and Google AI Gemini models.

A minor internal change to create the `GeminiService` at construction
time rather than on each request.

+ Observability (ChatLanguageModel) for Google AI Gemini


## General checklist
<!-- Please double-check the following points and mark them like this:
[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
- [/] 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-09-13 22:44:43 +02:00
LangChain4j f6148c340e fixing failing tests 2024-09-13 09:50:22 +02:00
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
Guillaume Laforge 67898076d6
#1363 — Add support for the Gemini AI model (#1695)
## Issue
Closes #1363

## Change
New module for the Google AI Gemini

## 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
- [ ] 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)

## Checklist for adding new model integration
- [x] I have added my new module in the
[BOM](https://github.com/langchain4j/langchain4j/blob/main/langchain4j-bom/pom.xml)
2024-09-04 15:39:15 +02:00
LangChain4j cc7121a016 remove System.out.println() from tests 2024-08-26 09:52:40 +02:00
PrimosK e535f0153d
re #1506 Enabling Maven (version) enforcer plugin in modules with no version conflicts (#1507)
## Issue

#1506

## Change

Enabled Maven Enforcer Plugin on modules without existing version
conflicts to ensure they remain conflict-free. The Maven Enforcer Plugin
will now cause the build to fail if new conflicts are introduced
guarding against these.

## Tests

`mvn clean test` passed
2024-08-06 15:21:25 +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
Guillaume Laforge 44ac06355c
Adding support to audio, video, PDF file inputs for multimodal models (#1464)
**#1463 adding audio, video, rich format support for multimodal models**
2024-07-23 14:18:48 +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
Guillaume Laforge 03aaa7676c
Fix a enum serialization issue leading to stackoverflow when creating schemas from classes (#1450)
- **Fixes #1447 Make vector embedding calculation in batch mode to speed
up the calculation of all embeddings for each label.**
- **Remove unneeded import**
- **[Gemini] Fix enum schema handling**
2024-07-12 14:28:05 +02:00
Guillaume Laforge 9d4be1591c
Update the Vertex AI and Gemini SDK libraries (#1443)
Updating the Vertex AI and Gemini SDK library versions.
2024-07-11 12:55:12 +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
Guillaume Laforge c154203bd5
Gemini updates (#1278)
Gemini updates:
* update to latest Java SDK version
* #1269
* #1270
* #1208
* #1399 
* #1397 
* #1182
* #828
* fixes parallel function calling which wasn't working properly in the
previous release
* refactored a bit the `generate()` method to have a single entry point
and less duplication

Vertex AI embedding model:
* add new task types (question answering and fact verification)

Imagen image model:
* support more configuration parameters
* #1367
2024-07-03 16:11:03 +02:00
LangChain4j a1b733d96d bumped version to 0.32.0-SNAPSHOT 2024-05-24 16:25:13 +02:00
Guillaume Laforge 6293c8f57e
fixes #827 (#1158) 2024-05-24 13:45:29 +02:00
LangChain4j d9cb1e9b81
Release 0.31.0 (#1151) 2024-05-23 17:40:52 +02:00
Guillaume Laforge a49ac33519
Gemini and Vertex AI update (#1141)
- support system instructions
- support parallel function calling
- should avoid the allocation issue faced sometimes because of the
lifecycle of the underlying VertexAI client object
2024-05-22 13:00:52 +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
LangChain4j 016f0b60ea
Fix #757: Gemini: allow SystemMessage(s), merge them into the first UserMessage, warn in logs (#812)
## Context
See https://github.com/langchain4j/langchain4j/issues/757

## Change
All `SystemMessage`s from the input are now merged together into the
first `UserMessage`.
Warning abut this is given (once) in the log.

## Checklist
Before submitting this PR, please check the following points:
- [X] I have added unit and integration tests for my change
- [X] All unit and integration tests in the module I have added/changed
are green
- [X] All 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 are 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 my new module in the
[BOM](https://github.com/langchain4j/langchain4j/blob/main/langchain4j-bom/pom.xml)
(only when a new module is added)
2024-03-25 09:13:06 +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
Guillaume Laforge 7fa0adc7de
Gemini function calling support (#692)
- Add Gemini function calling support, in both streaming and
non-streaming models
- Upgrade the Gemini Java SDK

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

- **New Features**
- Introduced functionality for converting tool execution requests into
function calls and vice versa, enhancing interaction capabilities.
- Expanded message handling in chat models to support different message
types and tool execution results.
- Added support for generating chat messages based on tool
specifications, allowing for more dynamic conversations.

- **Enhancements**
- Improved type conversion and message construction processes for better
efficiency and reliability.

- **Tests**
- Added comprehensive test coverage for new functionalities, ensuring
robustness and reliability of conversions and message handling.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-03-11 14:07:38 +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
LangChain4j 13c7ee7f1c Revert ServiceHelper refactoring (#485) 2024-02-05 14:39:34 +01:00