Commit Graph

1292 Commits

Author SHA1 Message Date
LangChain4j 07f2f3ccbb cleanup 2024-08-23 10:21:01 +02:00
LangChain4j d5d4b585cd fixed failing test 2024-08-23 10:20:42 +02:00
LangChain4j b153d5c5aa Azure OpenAI: disable expensive image generation tests (will run them manually before the release) 2024-08-23 10:05:36 +02:00
LangChain4j 790017cdb6 review @Disabled tests 2024-08-23 10:04:57 +02:00
LangChain4j 189ee7593f skip Ollama in nightly build 2024-08-22 17:53:22 +02:00
LangChain4j 9cbe9e1d85 fixing compliance checks 2024-08-22 16:37:37 +02:00
LangChain4j 7fd1656e2e fixing compliance checks 2024-08-22 16:31:31 +02:00
LangChain4j 73592ce72d 1505-feature-chroma-support-metadata-filtering (#1556)
support "not" filter
2024-08-22 16:23:58 +02:00
LangChain4j 4d21ae976e docu 2024-08-22 16:23:00 +02:00
LangChain4j 3e6d50ee40
EmbeddingStoreIT: use awaitility (#1610)
## Change
Use awaitility in `EmbeddingStoreIT`

## 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
- [x] I have manually run all the unit and integration tests in the
[core]
2024-08-22 16:17:53 +02:00
LangChain4j 2e47b126be [FEATURE] Adds SearchApi as WebSearchEngine and Tool (#1216) 2024-08-22 11:16:06 +02:00
Felipe Zambrin 99ed696f05
[FEATURE] Adds SearchApi as WebSearchEngine and Tool (#1216)
## Issue
Closes #1132 

## Change
Added SearchApi as a WebSearchEngine that also can be used as a tool.
Currently using Google Search as default engine. It also allows for new
engines to be implemented using the SearchApiRequestResponseHandler
interface, and adding it to the SearchApiEngine enum so the user can
choose which one to use.


## 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
- [X] I have added/updated the
[documentation](https://github.com/langchain4j/langchain4j/tree/main/docs/docs)
- [X] I have added an example in the [examples
repo](https://github.com/langchain4j/langchain4j-examples) (only for
"big" features)
* The example is in the docs, I will open a new PR to the examples repo
if it is ok

@algora-pbc /claim #1132
2024-08-22 11:05:39 +02:00
Anis 9cb8fe1e62
Anthropic: Added model "Claude 3.5 Sonnet" to AnthropicChatModelName (#1616) 2024-08-21 18:21:50 +02:00
LangChain4j 4c35bf79dc 1505-feature-chroma-support-metadata-filtering (#1556)
Fixed merge conflict
2024-08-21 15:51:34 +02:00
Alexey Titov 4d328ca15f
1505-feature-chroma-support-metadata-filtering (#1556)
## Issue
Closes #1505

## Change
Chroma metadata filtering is supported now

## 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
- [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
- [X] I have added/updated the
[documentation](https://github.com/langchain4j/langchain4j/tree/main/docs/docs)
- [X] I have added an example in the [examples
repo](https://github.com/langchain4j/langchain4j-examples) (only for
"big" features) -
https://github.com/langchain4j/langchain4j-examples/pull/99
- [ ] I have added/updated [Spring Boot
starter(s)](https://github.com/langchain4j/langchain4j-spring) (if
applicable)

## Checklist for changing existing embedding store integration
<!-- Please double-check the following points and mark them like this:
[X] -->
- [X] I have manually verified that the
`{NameOfIntegration}EmbeddingStore` works correctly with the data
persisted using the latest released version of LangChain4j
2024-08-21 15:48:00 +02:00
Julien Dubois fb4840d98c
Bump com.azure:azure-identity from 1.13.1 to 1.13.2 (#1609) 2024-08-21 11:45:38 +02:00
LangChain4j 2e6d386f3f EmbeddingStoreWithRemovalIT: use awaitility 2024-08-20 12:16:54 +02:00
LangChain4j ae589e0c8d EmbeddingStoreWithRemovalIT: use awaitility 2024-08-20 11:58:20 +02:00
LangChain4j 888bff0b46 Elasticsearch: Add approximative kNN search in addition to Cosine similarity (#712)
Fixed the following version conflict:
Rule 0: org.apache.maven.enforcer.rules.dependency.DependencyConvergence failed with message:
Failed while enforcing releasability.

Dependency convergence error for jakarta.json:jakarta.json-api🫙2.0.1 paths to dependency are:
+-dev.langchain4j:langchain4j-elasticsearch:jar:0.34.0-SNAPSHOT
  +-co.elastic.clients:elasticsearch-java:jar:8.14.3:compile
    +-jakarta.json:jakarta.json-api🫙2.0.1:compile
and
+-dev.langchain4j:langchain4j-elasticsearch:jar:0.34.0-SNAPSHOT
  +-co.elastic.clients:elasticsearch-java:jar:8.14.3:compile
    +-org.eclipse.parsson:parsson:jar:1.0.5:compile
      +-jakarta.json:jakarta.json-api🫙2.0.2:compile
2024-08-20 11:10:37 +02:00
David Pilato 8f6a140260
Elasticsearch: Add approximative kNN search in addition to Cosine similarity (#712)
The current implementation uses a slow function score query which is
known to be slow because you have to iterate over all the hits to
compute the score.

Elasticsearch in the recent versions, now also allow using knn search.

This PR now allows to change the configuration:

```java
// Use the Knn implementation
ElasticsearchEmbeddingStore store = ElasticsearchEmbeddingStore.builder()
  .configuration(ElasticsearchConfigurationKnn.builder().build())
  .restClient(restClient)
  .build();

// Note that this configuration is optional as it's the default behavior. So this code is equivalent:
ElasticsearchEmbeddingStore store = ElasticsearchEmbeddingStore.builder()
  .restClient(restClient)
  .build();

// Use the Scripting implementation (slower)
ElasticsearchEmbeddingStore store = ElasticsearchEmbeddingStore.builder()
  .configuration(ElasticsearchConfigurationScript.builder().build())
  .restClient(restClient)
  .build();
```

In more details, this is what this PR is bringing:

* Add a `configuration` new option in the builder. This helps to choose
the implementation to use. It could be
`ElasticsearchConfigurationScript` (the behavior before this change) or
`ElasticsearchConfigurationKnn` for the new Knn implementation
* The Knn implementation (`ElasticsearchConfigurationKnn`) is now the
default implementation
* Removes the `dimension` parameter as Elasticsearch can guess
automatically this value based on the first document indexed. And
anyway, it's better to let the user create an index template or the
index mapping he wants.
* Modify the IT. In which case if a local instance of Elasticsearch is
yet running on https://localhost:9200, we will use it by default and
start Testcontainers only if needed.
* Make Elasticsearch container secured (which is closer to production
use case)
* We now use the `elastic.version` `pom.xml` property to launch the
right Elasticsearch TestContainer.
* Replaced the `removeAll()` implementation from a `DeleteByQuery(match
all query)` to a Delete index API call which is always the recommended
way to remove all documents. Note that this does not recreate an index.
* `ElasticsearchEmbeddingStoreRemoveIT` now extends the common removal
test class `EmbeddingStoreWithRemovalIT`. But we need to implement in
the future a `EmbeddingStoreWithRemovalIT.wait_for_ready()` method to
allow even more common tests.
* Add more logs in implementation and tests
2024-08-20 11:05:42 +02:00
hrhrng ccd5370633
Feature 949 pinecone support metadata filter (#1601)
## Issue
Closes #949

## Change
Impeletement filter search in PineconeEmbeddingStore

## 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
- [X] I have manually run all the unit and integration tests in the
[core]

## Checklist for changing existing embedding store integration
- [X] I have manually verified that the
`{NameOfIntegration}EmbeddingStore` works correctly with the data
persisted using the latest released version of LangChain4j
2024-08-20 10:28:08 +02:00
Jundong Zhang 58d43a1186
Add file comments:ZhipuAiEmbeddingModel (#1607) 2024-08-20 09:32:15 +02:00
LangChain4j d7c075a84f
support run integration tests for changed and dependent modules (#1185) 2024-08-16 15:28:54 +02:00
Lane a8e7dbcc75
fix [BUG] #1585 (#1597)
## Issue
Fixes #1585
2024-08-16 14:54:58 +02:00
ashni 5cb71573d7
Update mongodb-atlas.md (#1515)
## Change
Updating MongoDB Atlas docs.
2024-08-16 13:57:06 +02:00
Yellow-- cdaccd3547
support run integration tests for changed and dependent modules (#1185)
## Issue
Closes #1000


## 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)
2024-08-16 13:52:42 +02:00
LangChain4j 45000fa8ec docu: Ollama examples 2024-08-16 11:16:13 +02:00
LangChain4j f7bd595f7c docu: Neo4j stores metadata 2024-08-16 11:03:53 +02:00
LangChain4j db3188ac0c Ollama Tools Support - only in OllamaChatModel (#1558) 2024-08-16 11:03:26 +02:00
bidek 8618d30b13
Ollama Tools Support - only in OllamaChatModel (#1558)
## Issue
Closes #1525
Closes #318

## Change
Add new DTOs to support Tool/Function calling.
Add new integration test and model configuration that supports Tool
Calls - Mistral
Modify some class to support Tool calling, for example
`OllamaChatModel`, `Role`

As stated here https://ollama.com/blog/tool-support, tools support is
not possible in streaming scenario - for now

I got the best results with the Mistral model, but without a
SystemMessage, it always wants to call a tool, even if it doesn't make
any sense. With Llama 3.1, it properly returns a ToolCallRequest but
ignores the result.

## 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)
2024-08-16 11:01:08 +02:00
hrhrng 5ec127dcb7
fix bug: AiMessage text content is not copied when toolCalls are present (#1576)
## Issue
<!-- Please specify the ID of the issue this PR is addressing. For
example: "Closes #1234" or "Fixes #1234" -->
https://github.com/langchain4j/langchain4j/issues/986
pr to solve same issue:
https://github.com/langchain4j/langchain4j/pull/1069

## Change
When Azure-OpenAI returns both content and tool_calls, keep them all
instead of just keeping the tool_calls.


## 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. -->
- [X] I have added/updated the
[documentation](https://github.com/langchain4j/langchain4j/tree/main/docs/docs)
- [X] I have added an example in the [examples
repo](https://github.com/langchain4j/langchain4j-examples) (only for
"big" features)
- [X] I have added/updated [Spring Boot
starter(s)](https://github.com/langchain4j/langchain4j-spring) (if
applicable)
2024-08-16 10:45:23 +02:00
LangChain4j ac7c2b9eda added dimensions parameter to specify by user in AzureOpenAiEmbeddingModel (#1578) 2024-08-16 10:42:18 +02:00
Devansh Rastogi 2df492cc25
added dimensions parameter to specify by user in AzureOpenAiEmbeddingModel (#1578)
## Issue
Closes #1528 

## Change
Added dimensions property for AzureOpenAiEmbeddingModel so that the user
can alter the dimensions for the non-listed models which results in the
change of constructor args, and builder args.


## 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)
- [ ] 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-08-16 10:38:27 +02:00
Michael Di 0b102fe0ff
Added an option to setup a proxy for Cohere score model (#1592)
## Issue

## Change
Added an option to setup a proxy for Cohere score model


## General checklist
<!-- Please double-check the following points and mark them like this:
[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-08-16 10:00:12 +02:00
LangChain4j c5c146f9a0
OpenAI: Structured Outputs (#1590)
## Issue
Closes #1581

## Change
- OpenAI: added support for [Structured
Outputs](https://openai.com/index/introducing-structured-outputs-in-the-api/):
  - for tools
  - for json mode
- Introduced new (still experimental) `ChatLanguageModel` API (which
supports specifying json schema)

### OpenAI Structured Outputs for tools
To enable Structured Outputs feature for tools, set `.strictTools(true)`
when buidling the model:
```java
OpenAiChatModel.builder()
    ...
    .strictTools(true)
    .build(),
```
Please note that this will automatically make all tool parameters
mandatory (`required` in json schema)
and set `additionalProperties=false` for each `object` in json schema.
This is due to the current OpenAI limitations.

### OpenAI Structured Outputs for json mode
To enable Structured Outputs feature for json mode, set
`.responseFormat("json_schema")` and `.strictJsonSchema(true)` when
buidling the model:
```java
OpenAiChatModel.builder()
    ...
    .responseFormat("json_schema")
    .strictJsonSchema(true)
    .build(),
```
In this case `AiServices` will not append "You must answer strictly in
the following JSON format: ..." string to the end of the last
`UserMessage`, but will create a Json schema from the given POJO and
pass it to the LLM.
Please note that this works only when method return type is a POJO. If
the return type is something else, (like an enum or a `List<String>`),
the old behaviour is applied (with "You must answer strictly ..."). All
return types will be supported in the near future.

Please note that this feature is available now only for `gpt-4o-mini`
and `gpt-4o-2024-08-06` models.

### Experimental `ChatLanguageModel` API
This was drafted in
https://github.com/langchain4j/langchain4j/pull/1261, but now it has to
be rushed a bit in order to enable new Structured Outputs feature for
OpenAI.
A new method `ChatResponse chat(ChatRequest request)` was added into
`ChatLanguageModel` which allows to specify messages, tools and response
format (with json schema). In the future it will also support specifying
model parameters like temperature.

## Upcoming Changes
- Adopt new `ChatLanguageModel` API for Gemini
- Adopt new `ChatLanguageModel` API for Azure OpenAI (once available)
- Support Structured Outputs with all other method return types like
`List<Pojo>`
- Adopt new `JsonSchema` type for tools (instead of `ToolParameters`)

Reated changes in openai4j:
https://github.com/ai-for-java/openai4j/pull/33

## 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
- [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-08-14 15:25:25 +02:00
yudong 56d6184aae
feat: Added embedding-3 model support for zhipu (#1589)
## Issue
Closes #1588

## Change


## 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. -->
- [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-08-14 09:03:52 +02:00
二毛 e3f171944a
Add timeout configuration item (#1573)
## Issue
Closes #1572

## Change


## 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-08-07 11:14:54 +02:00
Carlos Zela Bueno b246cfde70
[Bugfix 1458] Allowing web search results empty (#1570)
## Issue
Closes #1458

## Change

## 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-08-07 10:00:08 +02:00
LangChain4j 620dccbdd0 temporary disabling testcontainers for nightly build 2024-08-06 16:03:58 +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 267b947c63 cosmetics 2024-08-06 14:08:23 +02:00
Patrik Hörlin f2bf60029b
1465 : Ensuring trailing / in retrofit baseurl (#1519)
## Issue
Closes #1465

## Change
According to
[retrofit](https://github.com/square/retrofit/blob/trunk/retrofit%2Fsrc%2Fmain%2Fjava%2Fretrofit2%2FRetrofit.java#L564)
base urls should always end with `/`.

Added new utility method to ensure that a provided base url always ends
with a `/` and checked existing API classes so that they all start
**without** a `/`.

### Tests
I have added unit test for the new utility method but testing the actual
invocation of the method in the different builder classes is harder. The
existing Ollama test case spins up a temporary web server and I don't
want to replicate this to al lmodules since I suspect build times will
increase a lot etc.

Thoughts?

## 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
- [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-08-06 13:52:30 +02:00
LangChain4j 3af3b10bab fix bug: AiMessage text content is not copied when toolCalls are pres… (#1069)
isNullOrEmpty -> isNullOrBlank
2024-08-06 12:03:39 +02:00
hrhrng efe12b1f62
fix bug: AiMessage text content is not copied when toolCalls are pres… (#1069)
## Issue
Closes #986


## Change
When OpenAI returns both content and tool_calls, keep them all instead
of just keeping the tool_calls.


## 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
- [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
- [ ] I have added/updated the documentation
2024-08-06 12:00:06 +02:00
LangChain4j 2f0888b358 [FEATURE] Implemented removal methods for AzureAiSearchEmbeddingStore (#1563) 2024-08-06 11:47:04 +02:00
Devansh Rastogi 68903c3689
[FEATURE] Implemented removal methods for AzureAiSearchEmbeddingStore (#1563)
## Issue
Closes #1467 


## Change
- implemented remove(String id), removeAll(), removeAll(Collection ids),
removeAll(Filter filter) methods for AzureAiSearchEmbeddingStore.
- Added awaitUntilPersisted() after remove methods are called.
- Created ITs to test the changes


## 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)
2024-08-06 11:44:34 +02:00
Boris Petrov f5919a328f
Add `langchain4j-embeddings` to BOM (#1529)
## Issue
N/A

## Change
Add that module to the BOM so it can be used in other projects.

## 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-08-06 11:36:19 +02:00
ZYinNJU 9b990663b9
Ollama upgrade embedding with new API (#1565)
## Issue
Closes #1559  

## Change
1. Refactor `langchain4j-ollama` with new embedding API. `api/embedding`
to `api/embed`.
2. Support embed multi input.


## 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
- [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-08-06 10:38:28 +02:00
James Choi 270540b05f
fix: replace space with %20 in url (#1541)
## Issue
Fixes #1540 

## Change
Replace spaces with "%20" in URLs returned by Tavily

## 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-08-06 09:33:04 +02:00
Julien Dubois 5f06c78092
Bump com.azure:azure-search-documents from 11.6.6 to 11.7.0 (#1533) 2024-08-05 18:04:35 +02:00