Commit Graph

838 Commits

Author SHA1 Message Date
LangChain4j 6b96848d2e Docu: added "Deleting Embeddings" column to embedding store comparison table 2024-05-25 19:43:24 +02:00
小宇~ 7639a7558d
Update qianfan.md (#1149)
Update qianfan.md
2024-05-24 14:38:56 +02:00
LangChain4j d9cb1e9b81
Release 0.31.0 (#1151) 2024-05-23 17:40:52 +02:00
Carlos Zela Bueno acdefd34b0
[Documentation] Mistral open mixtral8x22b docs (#979)
Mistral AI documentation updated with new open source model and some
references.
2024-05-22 17:32:43 +02:00
LangChain4j 31be4a8c5f Jina AI Embedding model integration (#997) 2024-05-22 17:20:49 +02:00
LangChain4j 83606feab9
#866: Support embedding using Cohere (#1145)
## Issue
https://github.com/langchain4j/langchain4j/issues/866


## Change
Copied `CohereEmbeddingModel` from
https://github.com/stephanj/langchain4j-cohere
Kudos to @stephanj for the implementation 🤗 


## 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)
2024-05-22 17:18:35 +02:00
LangChain4j 92c5ed0297 Adding jina as scoring model. Feature request: #974 (#1053) 2024-05-22 15:38:30 +02:00
Kevin Smeyers 70d1b4a3b0
Adding jina as scoring model. Feature request: #974 (#1053)
Module added according #973 in order to minimize conflicts.
Implementation in line with cohere reranking

<!-- Thank you so much for your contribution! -->
<!-- Please fill in all the sections below. -->

<!-- Please open the PR as a draft initially. Once it is reviewed and
approved, we will ask you to add documentation and examples. -->
<!-- Please note that PRs with breaking changes will be rejected. -->
<!-- Please note that PRs without tests will be rejected. -->

<!-- Please note that PRs will be reviewed based on the priority of the
issues they address. -->
<!-- We ask for your patience. We are doing our best to review your PR
as quickly as possible. -->
<!-- Please refrain from pinging and asking when it will be reviewed.
Thank you for understanding! -->


## Issue
https://github.com/langchain4j/langchain4j/issues/974


## Change

- Adding Jina ai as a scoring model.
- Default model: jina-reranker-v1-base-en
- Default url: https://api.jina.ai/v1/
- Used Jackson object mapper instead of Gson, as I found it it's
langchain4j intent to move away from Gson
- Tried to keep implementation in line with Cohere reranking module

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


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

---------

Co-authored-by: Kevin Smeyers <kevin.smeyers@audlau.be>
Co-authored-by: LangChain4j <langchain4j@gmail.com>
2024-05-22 14:55:02 +02:00
Steven Pousty 64bf704e54
Instructions for adding base langchain4j dependency (#1138)
<!-- Thank you so much for your contribution! -->
<!-- Please fill in all the sections below. -->

<!-- Please open the PR as a draft initially. Once it is reviewed and
approved, we will ask you to add documentation and examples. -->
<!-- Please note that PRs with breaking changes will be rejected. -->
<!-- Please note that PRs without tests will be rejected. -->

<!-- Please note that PRs will be reviewed based on the priority of the
issues they address. -->
<!-- We ask for your patience. We are doing our best to review your PR
as quickly as possible. -->
<!-- Please refrain from pinging and asking when it will be reviewed.
Thank you for understanding! -->


## Issue
<!-- Please paste the link to the issue this PR is addressing. For
example: https://github.com/langchain4j/langchain4j/issues/1012 -->
None - just a doc issue


## Change
<!-- Please describe the changes you made. -->
The current getting started only shows using an integrations specific
library. At least for the Ollama integration, there are no Services in
the integration jar. A user needs to add the core jar but this is not
mentioned in any docs I could find.

It is demonstrated in the tutorials under the examples repo.

https://github.com/langchain4j/langchain4j-examples/blob/main/tutorials/pom.xml


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


## Checklist for adding new model integration
<!-- Please double-check the following points and mark them like this:
[X] -->
- [ ] I have added my new module in the
[BOM](https://github.com/langchain4j/langchain4j/blob/main/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 my new module in the
[BOM](https://github.com/langchain4j/langchain4j/blob/main/langchain4j-bom/pom.xml)


## 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-05-22 08:32:38 +02:00
LangChain4j 17bf44548c Docu: added more useful materials 2024-05-18 09:05:30 +02:00
Kais Neffati d365ca4037
[FEATURE] Retrieve Documents when using AiService (#1015)
Closes #660

## 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-05-17 07:42:30 +02:00
dliubars 0efda674f9 Docu: AI Services: Streaming, ChatMemory, Tools, RAG 2024-05-15 15:55:01 +02:00
dliubars 55fb7f667c Docu: AI Services: Streaming, ChatMemory, Tools, RAG 2024-05-15 15:50:02 +02:00
dliubars fca5c9d4ec Docu: chat memory store eviction 2024-05-15 14:54:52 +02:00
dliubars 4f5ef17190 Docu: RAG: described RAG stages and expanded on RAG APIs 2024-05-15 14:38:50 +02:00
dliubars bda06b7784 Docu: memory vs history 2024-05-15 12:44:13 +02:00
LangChain4j eae395c114 Docu: added Groq to the list of supported models 2024-05-14 11:15:31 +02:00
LangChain4j 362410d986 Docu: updated Quarkus integration text 2024-05-14 11:13:37 +02:00
LangChain4j 3746f58e30 Docu: added RAG example 2024-05-11 16:03:08 +02:00
LangChain4j fb29898b37 Docu: RAG 2024-05-07 10:20:08 +02:00
LangChain4j 7028a4beb2 Docu: updated embedding store comparison table 2024-05-06 16:35:53 +02:00
Carlos Zela Bueno d28f5ab470
[FEATURE] WebSearchEngine as ContentRetriver and tool (#642)
## Web Search Engine v1
As the first web engine is added in the `web/search` folder and open the
possibility of adding other types of web tools such as media, maps, etc
within web folder.
```
 web
    ├─search (included in this PR)
    └─media
```
`WebSearchEngine` interface responsible to perform searches on the Web
in response to a user query.

The most popular search engines can be implemented on top of this:
- [Google
Search](https://developers.google.com/custom-search/docs/overview)
(Integration is coming is a [separate
PR](https://github.com/langchain4j/langchain4j/pull/641))
- Bing Search
- SerpApi Search
- Tavily AI Search
- etc

`WebSearchRequest` and `WebSearchResults` (response) follow
[opensearch](https://github.com/dewitt/opensearch) foundation standard
implemented by most web search engine libs like Google, Bing, Yahoo, etc
and powered by W3C.

## Web Search Engine as ContentRetriever - RAG

This PR also introduces out-of-the-box `WebSearchContentRetriever` who
is an implementation of a `ContentRetriever` as part of the advanced RAG
flow. The default behavior is currently supported on this PR (v1):

1. Default: Developer wants snippet web pages back (v1)
2. Optional: Developer wants to retrieve only the relevant segments from
scrapped web pages => developer configures `DocumentSplitter` and
`EmbeddingModel` and `minScore` to return results (can be introduced in v2).

## Web Search Engine as Function calling - Tool
Any implementation of `WebSearchEngine` must be able construct a
`WebSearchTool`, so any LM who support function calling like
OpenAI/LocalAI, Azure OpenAI, Gemini Pro, MistralAI, etc to search
current information using an `WebSearchTool`.

Here is how the web search can be visualized:

![web-search-engine](https://github.com/langchain4j/langchain4j/assets/1715122/d8b4b89c-9a72-430b-9b76-54186e847602)


#### Others
- In the `langchain4j-examples` project, examples will be added of how
to use it with GoogleSearch as a Tool and as a content retriever in a
RAG flow in the next days.
- Documentation will be updated in the next days as well.
2024-05-03 10:22:26 +02:00
LangChain4j 244dca6554 Docu: RAG 2024-05-02 09:35:14 +02:00
LangChain4j 94b04721c2 Docu: clarifications 2024-04-29 10:32:14 +02:00
LangChain4j 689f6501b2 Docu: RAG: Metadata 2024-04-29 10:31:56 +02:00
LangChain4j f95f2e0373 Docs: RAG 2024-04-24 08:38:04 +02:00
LangChain4j f492df627b Docs: streaming properties 2024-04-22 15:47:39 +02:00
LangChain4j 60ac8263e3 Docu: OpenAI: added missing properties 2024-04-18 16:30:02 +02:00
LangChain4j 65375e7894 Docu: integrations 2024-04-18 09:45:56 +02:00
LangChain4j bc10d8f304 Docu: added comparison table for language models 2024-04-17 11:14:39 +02:00
LangChain4j 13878cd0dc Docu: added skipping RAG example 2024-04-17 10:13:38 +02:00
LangChain4j 4f919c44ef Docu: fixed broken links 2024-04-16 19:08:01 +02:00
LangChain4j 1a340893ec
Release 0.30.0 (#945) 2024-04-16 18:21:01 +02:00
LangChain4j b826dc2df7
Anthropic: Support tools (#897)
## Context
Anthropic recently began supporting tools:
https://docs.anthropic.com/claude/docs/tool-use


## Change
This PR adds support for tools in `AnthropicChatModel`.
`AnthropicStreamingChatModel` does not support tools yet, because
Anthropic does not support tools when streaming.


## Checklist
Before submitting this PR, please check the following points:
- [X] Test in AiServicesWithToolsIT
- [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)

## Checklist for adding new embedding store integration
- [ ] I have added a {NameOfIntegration}EmbeddingStoreIT that extends
from either EmbeddingStoreIT or EmbeddingStoreWithFilteringIT
2024-04-16 11:49:08 +02:00
LangChain4j e55cda0a82
AI Services: testing, refactoring and documentation (#933)
## Change
- testing, refactoring and documentation after #862, #930
- `userMessageProvider` is removed as discussed in #862

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

## Checklist for adding new embedding store integration
- [ ] I have added a {NameOfIntegration}EmbeddingStoreIT that extends
from either EmbeddingStoreIT or EmbeddingStoreWithFilteringIT
2024-04-16 10:06:06 +02:00
LangChain4j 62f2a1193e Docu: expanded chat memory 2024-04-15 13:26:15 +02:00
LangChain4j b50548290a Docu: expanded chat memory 2024-04-15 11:08:03 +02:00
LangChain4j e29b59f0cb Docu: WIP: Integrations 2024-04-12 09:23:31 +02:00
LangChain4j febb3bd927 Docu: WIP: OpenAI 2024-04-12 09:23:21 +02:00
dependabot[bot] fd52ff8b47
Bump express from 4.18.2 to 4.19.2 in /docs (#831)
Bumps [express](https://github.com/expressjs/express) from 4.18.2 to
4.19.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/expressjs/express/releases">express's
releases</a>.</em></p>
<blockquote>
<h2>4.19.2</h2>
<h2>What's Changed</h2>
<ul>
<li><a
href="0b746953c4">Improved
fix for open redirect allow list bypass</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/expressjs/express/compare/4.19.1...4.19.2">https://github.com/expressjs/express/compare/4.19.1...4.19.2</a></p>
<h2>4.19.1</h2>
<h2>What's Changed</h2>
<ul>
<li>Fix ci after location patch by <a
href="https://github.com/wesleytodd"><code>@​wesleytodd</code></a> in <a
href="https://redirect.github.com/expressjs/express/pull/5552">expressjs/express#5552</a></li>
<li>fixed un-edited version in history.md for 4.19.0 by <a
href="https://github.com/wesleytodd"><code>@​wesleytodd</code></a> in <a
href="https://redirect.github.com/expressjs/express/pull/5556">expressjs/express#5556</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/expressjs/express/compare/4.19.0...4.19.1">https://github.com/expressjs/express/compare/4.19.0...4.19.1</a></p>
<h2>4.19.0</h2>
<h2>What's Changed</h2>
<ul>
<li>fix typo in release date by <a
href="https://github.com/UlisesGascon"><code>@​UlisesGascon</code></a>
in <a
href="https://redirect.github.com/expressjs/express/pull/5527">expressjs/express#5527</a></li>
<li>docs: nominating <a
href="https://github.com/wesleytodd"><code>@​wesleytodd</code></a> to be
project captian by <a
href="https://github.com/wesleytodd"><code>@​wesleytodd</code></a> in <a
href="https://redirect.github.com/expressjs/express/pull/5511">expressjs/express#5511</a></li>
<li>docs: loosen TC activity rules by <a
href="https://github.com/wesleytodd"><code>@​wesleytodd</code></a> in <a
href="https://redirect.github.com/expressjs/express/pull/5510">expressjs/express#5510</a></li>
<li>Add note on how to update docs for new release by <a
href="https://github.com/crandmck"><code>@​crandmck</code></a> in <a
href="https://redirect.github.com/expressjs/express/pull/5541">expressjs/express#5541</a></li>
<li><a
href="660ccf5fa3">Prevent
open redirect allow list bypass due to encodeurl</a></li>
<li>Release 4.19.0 by <a
href="https://github.com/wesleytodd"><code>@​wesleytodd</code></a> in <a
href="https://redirect.github.com/expressjs/express/pull/5551">expressjs/express#5551</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/crandmck"><code>@​crandmck</code></a>
made their first contribution in <a
href="https://redirect.github.com/expressjs/express/pull/5541">expressjs/express#5541</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/expressjs/express/compare/4.18.3...4.19.0">https://github.com/expressjs/express/compare/4.18.3...4.19.0</a></p>
<h2>4.18.3</h2>
<h2>Main Changes</h2>
<ul>
<li>Fix routing requests without method</li>
<li>deps: body-parser@1.20.2
<ul>
<li>Fix strict json error message on Node.js 19+</li>
<li>deps: content-type@~1.0.5</li>
<li>deps: raw-body@2.5.2</li>
</ul>
</li>
</ul>
<h2>Other Changes</h2>
<ul>
<li>Use https: protocol instead of deprecated git: protocol by <a
href="https://github.com/vcsjones"><code>@​vcsjones</code></a> in <a
href="https://redirect.github.com/expressjs/express/pull/5032">expressjs/express#5032</a></li>
<li>build: Node.js@16.18 and Node.js@18.12 by <a
href="https://github.com/abenhamdine"><code>@​abenhamdine</code></a> in
<a
href="https://redirect.github.com/expressjs/express/pull/5034">expressjs/express#5034</a></li>
<li>ci: update actions/checkout to v3 by <a
href="https://github.com/armujahid"><code>@​armujahid</code></a> in <a
href="https://redirect.github.com/expressjs/express/pull/5027">expressjs/express#5027</a></li>
<li>test: remove unused function arguments in params by <a
href="https://github.com/raksbisht"><code>@​raksbisht</code></a> in <a
href="https://redirect.github.com/expressjs/express/pull/5124">expressjs/express#5124</a></li>
<li>Remove unused originalIndex from acceptParams by <a
href="https://github.com/raksbisht"><code>@​raksbisht</code></a> in <a
href="https://redirect.github.com/expressjs/express/pull/5119">expressjs/express#5119</a></li>
<li>Fixed typos by <a
href="https://github.com/raksbisht"><code>@​raksbisht</code></a> in <a
href="https://redirect.github.com/expressjs/express/pull/5117">expressjs/express#5117</a></li>
<li>examples: remove unused params by <a
href="https://github.com/raksbisht"><code>@​raksbisht</code></a> in <a
href="https://redirect.github.com/expressjs/express/pull/5113">expressjs/express#5113</a></li>
<li>fix: parameter str is not described in JSDoc by <a
href="https://github.com/raksbisht"><code>@​raksbisht</code></a> in <a
href="https://redirect.github.com/expressjs/express/pull/5130">expressjs/express#5130</a></li>
<li>fix: typos in History.md by <a
href="https://github.com/raksbisht"><code>@​raksbisht</code></a> in <a
href="https://redirect.github.com/expressjs/express/pull/5131">expressjs/express#5131</a></li>
<li>build : add Node.js@19.7 by <a
href="https://github.com/abenhamdine"><code>@​abenhamdine</code></a> in
<a
href="https://redirect.github.com/expressjs/express/pull/5028">expressjs/express#5028</a></li>
<li>test: remove unused function arguments in params by <a
href="https://github.com/raksbisht"><code>@​raksbisht</code></a> in <a
href="https://redirect.github.com/expressjs/express/pull/5137">expressjs/express#5137</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/expressjs/express/blob/master/History.md">express's
changelog</a>.</em></p>
<blockquote>
<h1>4.19.2 / 2024-03-25</h1>
<ul>
<li>Improved fix for open redirect allow list bypass</li>
</ul>
<h1>4.19.1 / 2024-03-20</h1>
<ul>
<li>Allow passing non-strings to res.location with new encoding handling
checks</li>
</ul>
<h1>4.19.0 / 2024-03-20</h1>
<ul>
<li>Prevent open redirect allow list bypass due to encodeurl</li>
<li>deps: cookie@0.6.0</li>
</ul>
<h1>4.18.3 / 2024-02-29</h1>
<ul>
<li>Fix routing requests without method</li>
<li>deps: body-parser@1.20.2
<ul>
<li>Fix strict json error message on Node.js 19+</li>
<li>deps: content-type@~1.0.5</li>
<li>deps: raw-body@2.5.2</li>
</ul>
</li>
<li>deps: cookie@0.6.0
<ul>
<li>Add <code>partitioned</code> option</li>
</ul>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="04bc62787b"><code>04bc627</code></a>
4.19.2</li>
<li><a
href="da4d763ff6"><code>da4d763</code></a>
Improved fix for open redirect allow list bypass</li>
<li><a
href="4f0f6cc67d"><code>4f0f6cc</code></a>
4.19.1</li>
<li><a
href="a003cfab03"><code>a003cfa</code></a>
Allow passing non-strings to res.location with new encoding handling
checks f...</li>
<li><a
href="a1fa90fcea"><code>a1fa90f</code></a>
fixed un-edited version in history.md for 4.19.0</li>
<li><a
href="11f2b1db22"><code>11f2b1d</code></a>
build: fix build due to inconsistent supertest behavior in older
versions</li>
<li><a
href="084e36506a"><code>084e365</code></a>
4.19.0</li>
<li><a
href="0867302ddb"><code>0867302</code></a>
Prevent open redirect allow list bypass due to encodeurl</li>
<li><a
href="567c9c665d"><code>567c9c6</code></a>
Add note on how to update docs for new release (<a
href="https://redirect.github.com/expressjs/express/issues/5541">#5541</a>)</li>
<li><a
href="69a4cf2819"><code>69a4cf2</code></a>
deps: cookie@0.6.0</li>
<li>Additional commits viewable in <a
href="https://github.com/expressjs/express/compare/4.18.2...4.19.2">compare
view</a></li>
</ul>
</details>
<details>
<summary>Maintainer changes</summary>
<p>This version was pushed to npm by <a
href="https://www.npmjs.com/~wesleytodd">wesleytodd</a>, a new releaser
for express since your current version.</p>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=express&package-manager=npm_and_yarn&previous-version=4.18.2&new-version=4.19.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-04-11 12:00:53 +02:00
LangChain4j dcbc562fe8 docu: logging 2024-04-09 20:57:24 +02:00
Remy Ohajinwa 9f6fc54770
#880 Fix RAG + TOOLS broken link (#889)
<!-- Thank you so much for your contribution! -->
<!-- Please fill in all the sections below. -->
<!-- Please note that PRs without tests will be rejected. -->

## Context
<!-- Please provide some context so that it is clear why this change is
required. -->

## Change
<!-- Please describe the changed you made. -->

## Checklist
Before submitting this PR, please check the following points:
- [ ] I have added unit and integration tests for my change
- [ ] All unit and integration tests in the module I have added/changed
are green
- [ ] 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
- [ ] 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)

## Checklist for adding new embedding store integration
- [ ] I have added a {NameOfIntegration}EmbeddingStoreIT that extends
from either EmbeddingStoreIT or EmbeddingStoreWithFilteringIT

Co-authored-by: Remy Ohajinwa <remyohajinwa@Remys-MacBook-Pro.local>
2024-04-08 17:15:58 +02:00
LangChain4j 45b58ac993
released 0.29.1 (#857) 2024-03-28 16:42:45 +01:00
LangChain4j 57cd62cf0e Docu: RAG 2024-03-28 09:15:14 +01:00
LangChain4j 0bdade2865
Docu: RAG (#846) 2024-03-27 17:44:48 +01:00
LangChain4j 7aa75324ed Docu: Mistral AI json mode 2024-03-27 12:49:22 +01:00
Quentin 2185c0fb93
Fix some typos (#835)
<!-- Thank you so much for your contribution! -->

## Context
<!-- Please provide some context so that it is clear why this change is
required. -->

## Change
<!-- Please describe the changed you made. -->

## Checklist
Before submitting this PR, please check the following points:
- [ ] I have added unit and integration tests for my change
- [ ] All unit and integration tests in the module I have added/changed
are green
- [ ] 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)

---------

Co-authored-by: LangChain4j <langchain4j@gmail.com>
2024-03-27 09:15:44 +01:00
LangChain4j 8ea1c12f03 Docu: AI Services in Quarkus and Spring Boot 2024-03-26 15:44:54 +01:00
LangChain4j daaff4d2f6 updated example links in docu 2024-03-26 14:21:36 +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
dependabot[bot] b3c0dad47d
Bump webpack-dev-middleware from 5.3.3 to 5.3.4 in /docs (#807)
Bumps
[webpack-dev-middleware](https://github.com/webpack/webpack-dev-middleware)
from 5.3.3 to 5.3.4.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/webpack/webpack-dev-middleware/releases">webpack-dev-middleware's
releases</a>.</em></p>
<blockquote>
<h2>v5.3.4</h2>
<h3><a
href="https://github.com/webpack/webpack-dev-middleware/compare/v5.3.3...v5.3.4">5.3.4</a>
(2024-03-20)</h3>
<h3>Bug Fixes</h3>
<ul>
<li><strong>security:</strong> do not allow to read files above (<a
href="https://redirect.github.com/webpack/webpack-dev-middleware/issues/1779">#1779</a>)
(<a
href="189c4ac7d2">189c4ac</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/webpack/webpack-dev-middleware/blob/v5.3.4/CHANGELOG.md">webpack-dev-middleware's
changelog</a>.</em></p>
<blockquote>
<h3><a
href="https://github.com/webpack/webpack-dev-middleware/compare/v5.3.3...v5.3.4">5.3.4</a>
(2024-03-20)</h3>
<h3>Bug Fixes</h3>
<ul>
<li><strong>security:</strong> do not allow to read files above (<a
href="https://redirect.github.com/webpack/webpack-dev-middleware/issues/1779">#1779</a>)
(<a
href="189c4ac7d2">189c4ac</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="86071ead69"><code>86071ea</code></a>
chore(release): 5.3.4</li>
<li><a
href="189c4ac7d2"><code>189c4ac</code></a>
fix(security): do not allow to read files above (<a
href="https://redirect.github.com/webpack/webpack-dev-middleware/issues/1779">#1779</a>)</li>
<li>See full diff in <a
href="https://github.com/webpack/webpack-dev-middleware/compare/v5.3.3...v5.3.4">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=webpack-dev-middleware&package-manager=npm_and_yarn&previous-version=5.3.3&new-version=5.3.4)](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-03-25 09:02:59 +01:00
Carlos Zela Bueno 50af4b39d5
[DOCS] MistralAI function calling docs (#765) 2024-03-25 08:39:56 +01:00
Raja Kolli fa110d33fd
adds PGVector Store example (#792)
Updated documentation with PGVector link
2024-03-22 10:41:05 +01:00
Carlos Zela Bueno 3783e95587
[DOCS] Update overview integration table with new integrations (#766)
This PR remove `async` columns of the integration table and add
`Anthropic` and `Zhipu AI` as new integrations.
Also, this PR add a new column named `Function calling` to display the
capabilities already supported.

Co-authored-by: Lize Raes <49833622+LizeRaes@users.noreply.github.com>
2024-03-20 14:56:15 +01:00
dependabot[bot] b501601546
Bump follow-redirects from 1.15.4 to 1.15.6 in /docs (#771)
Bumps
[follow-redirects](https://github.com/follow-redirects/follow-redirects)
from 1.15.4 to 1.15.6.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="35a517c586"><code>35a517c</code></a>
Release version 1.15.6 of the npm package.</li>
<li><a
href="c4f847f851"><code>c4f847f</code></a>
Drop Proxy-Authorization across hosts.</li>
<li><a
href="8526b4a1b2"><code>8526b4a</code></a>
Use GitHub for disclosure.</li>
<li><a
href="b1677ce001"><code>b1677ce</code></a>
Release version 1.15.5 of the npm package.</li>
<li><a
href="d8914f7982"><code>d8914f7</code></a>
Preserve fragment in responseUrl.</li>
<li>See full diff in <a
href="https://github.com/follow-redirects/follow-redirects/compare/v1.15.4...v1.15.6">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=follow-redirects&package-manager=npm_and_yarn&previous-version=1.15.4&new-version=1.15.6)](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-03-20 14:28:11 +01:00
Eddú Meléndez Gonzales 3fabe0ed66
Use Testcontainers Ollama module (#702)
Testcontainers 1.19.7 offers an Ollama module. It also configures gpu if
available.
2024-03-19 13:05:24 +01:00
LangChain4j 90fe3040b9
released 0.28.0 (#735) 2024-03-11 20:08:55 +01:00
kuraleta a46fd20807
WIP: integration with Anthropic (#727)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **New Features**
- Introduced classes and interfaces to facilitate chat interactions with
the Anthropic API, enabling chat completion functionalities.
- Developed a client class for seamless interaction with the AnthropicAI
API, including authentication and request handling.
- Implemented utility methods for message conversion and managing token
usage in chat interactions.
- Defined an enum to distinguish between user and assistant roles in
chat scenarios.
- Added logging interceptors for HTTP requests and responses to enhance
debugging capabilities.
- Created a model class for generating AI responses from chat messages
using the Anthropic API.
- Added a request model class for creating messages in the Anthropic
system.
- Introduced a class for representing image content with type and source
details.
- Included integration tests for the `AnthropicChatModel` class covering
various functionalities.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-03-11 15:32:34 +01:00
Siben Nayak e54037b3e4
Fix UserMessage example in AiServices (#719)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Documentation**
- Updated the AI services tutorial to reflect changes in message
annotation semantics within the chat system.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-03-11 07:52:35 +01:00
Andrew Popkov e62ea2f15e
Update documentation on Vertex AI (#709)
Provide instructions on creating Google Cloud Platform account and
establishing a new project with use of Vertex AI API. Add basic code
samples for using google's PaLM2, Gemini and Embedding models. List
available model names.

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


- **Documentation**
- Updated the guide on Google Vertex AI Embedding Models with
dependencies, example code, and available models.
	- Added a link to an article about image generation with Imagen.
- Expanded the documentation for Google Gemini with setup instructions,
authentication strategies, example uses, and early access information.
- Detailed instructions for getting started with Google Vertex AI PaLM
2, including dependencies, example code, and model information.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: Lize Raes <49833622+LizeRaes@users.noreply.github.com>
2024-03-08 12:29:07 +01:00
dliubars 657aac9519
docu: added link to Guide to Choosing Quantization Methods and Infere… (#705)
…nce Engines
2024-03-06 08:11:26 +01:00
LangChain4j 200522f558 docu: links 2024-03-04 14:16:01 +01:00
LangChain4j 7f83ae0fb8 docu: links 2024-03-04 14:13:23 +01:00
LangChain4j 1fb05b0b8f docu: links 2024-03-04 13:49:03 +01:00
LangChain4j bc2e72da2a docu: links 2024-03-04 13:45:48 +01:00
LangChain4j 5bd2e84d39 docu: useful materials, removed blog 2024-03-04 13:40:31 +01:00
LangChain4j bad4a9d6ef docu: useful materials 2024-03-04 13:27:01 +01:00
LangChain4j aa1f6dbc74 Docu: Tools and JSON mode 2024-02-28 16:41:15 +01:00
LangChain4j 06126cc289 docu: added Tools tutorial by Ken Kousen 2024-02-26 07:40:44 +01:00
LangChain4j 13da897767 docu: added RAG tutorial by Siva 2024-02-26 07:27:15 +01:00
LangChain4j 08076df2a2 docu: cosmetics 2024-02-23 14:36:53 +01:00
LangChain4j b6d8e09cb8 docu: cosmetics 2024-02-23 14:30:06 +01:00
LangChain4j 4094a5b2cb docu: added links to related tutorials 2024-02-23 14:29:13 +01:00
LangChain4j ff2b6bde9a docu: added more examples and info 2024-02-23 14:28:59 +01:00
LangChain4j b3cf5575ee docu: added more examples and info 2024-02-23 14:23:23 +01:00
LangChain4j b8a0cd5513 docu: added more examples and info 2024-02-23 14:14:43 +01:00
LangChain4j d29f2d4cdb docu: AiServices: added more on chaining 2024-02-23 13:35:31 +01:00
LangChain4j 8a22890de3 docu: cosmetics 2024-02-23 13:17:04 +01:00
LangChain4j cf1210584c docu: simplified get-started 2024-02-22 16:45:28 +01:00
LangChain4j fcd6f96110 Docs: Updated the redundant base route from /docs to / (#655) 2024-02-22 15:57:53 +01:00
Amith Koujalgi ae662f905d
Docs: Updated the redundant base route from `/docs` to `/` (#655)
The redundant base route `/docs` has been updated to `/`. Also, all the
links used in the docs markdown files have been updated accordingly.
Please verify if everything looks fine.

Thanks!
2024-02-22 15:21:09 +01:00
LangChain4j bccda2a134 docu: added more info on chaining and decomposing AI Services 2024-02-22 10:47:47 +01:00
LangChain4j 26ae9586ef Revert "added Tools column to integrations table"
This reverts commit e53cb31e41.
2024-02-21 18:29:28 +01:00
LangChain4j ed1b37a4b1 Revert "added Tools column to integrations table"
This reverts commit af628adb85.
2024-02-21 18:29:13 +01:00
LangChain4j af628adb85 added Tools column to integrations table 2024-02-21 17:04:01 +01:00
LangChain4j e53cb31e41 added Tools column to integrations table 2024-02-21 16:56:37 +01:00
LangChain4j 6e9e3df18b updated links to new documentation domain 2024-02-21 14:47:45 +01:00
LangChain4j 20ca3dbe02 docu: updated baseUrl 2024-02-21 14:39:13 +01:00
LangChain4j e572e95fa5 docu: added intro to LLMs by Karpathy 2024-02-21 14:25:33 +01:00
LangChain4j f112b06258 docu: demo key warning 2024-02-21 11:31:08 +01:00
LangChain4j de0aa92a93 docu: demo key warning 2024-02-21 11:21:35 +01:00
LangChain4j 18fb2ceaf0 docu: AI Services 2024-02-21 11:13:17 +01:00
LangChain4j f330fa8fa3 docu: AI Services 2024-02-21 09:34:36 +01:00
LangChain4j 4c3d9413d5 docu: simplified get started page 2024-02-21 08:20:52 +01:00
Holly Cummins 8f5948b978
Fill in some details of the Quarkus integration in the docs (#632)
The empty page looks a bit lonely, so I've added some content. I tried
to find a balance between being informative, and duplicating content
from the Quarkus Langchain4j docs. Too much duplication would be a
maintenance headache (and risk showing people outdated information).

Here's my local view of the new content: 

<img width="1649" alt="image"
src="https://github.com/langchain4j/langchain4j/assets/11509290/26fed38e-c592-4654-85d3-9060c1a5d26b">

<img width="1649" alt="image"
src="https://github.com/langchain4j/langchain4j/assets/11509290/8f13c83b-65ce-46b7-b3b2-1845540930a9">
2024-02-19 15:05:21 +01:00
Carlos Zela Bueno 0df829c9db
[Documentation] Add Mistralai docs (#623)
Hi @LizeRaes 
I added documentation for the MistralAI integration, it is updated to
link to the summary table added in this
[PR#609](https://github.com/langchain4j/langchain4j/pull/609)

Also, it takes as base the examples added in the `langchain4j-examples`
project added in this [PR#56
](https://github.com/langchain4j/langchain4j-examples/pull/56) still
pending to merge :)

---------

Co-authored-by: LangChain4j <langchain4j@gmail.com>
Co-authored-by: Lize Raes <49833622+LizeRaes@users.noreply.github.com>
2024-02-19 08:56:43 +01:00
Shaaf, Syed 3e432486ff
fix for issue #633 adding instructions for additional artifact for Op… (#634)
fixes the documentation to add dependency for compiling 

```java
OpenAiChatModel model = OpenAiChatModel.withApiKey(apiKey);
```
2024-02-13 16:46:52 +01:00
LangChain4j 5d0ad943e5 Docu: ai services 2024-02-09 15:08:34 +01:00
LangChain4j c1462c087f
release 0.27.1 (#621) 2024-02-09 15:00:42 +01:00
LangChain4j 8421e56a1b Docu: added diagrams for RAG 2024-02-09 11:39:01 +01:00
LangChain4j 8dc5af622c
Docu: added diagrams and examples for RAG (#619) 2024-02-09 11:31:24 +01:00
LangChain4j b6ff37377a Docu: started documenting AI Services 2024-02-09 10:58:01 +01:00
LangChain4j 37b78f232b Docu: renaming 2024-02-09 10:57:43 +01:00
LangChain4j a22d297104
Release 0.27.0 (#615) 2024-02-09 08:00:34 +01:00
Katia Aresti 7d89ea229e
First Infinispan Integration / Langchain (#552)
This is the first implementation of Infinispan as Embeddings Store for
langchain
The current version is 15.0.0.Dev07, which will be in a final release in
a few weeks time

closes #553

Example https://github.com/langchain4j/langchain4j-examples/pull/42
2024-02-08 11:15:07 +01:00
LangChain4j dc4028b546 Docu: response streaming 2024-02-08 09:22:29 +01:00
LangChain4j d61f9c7d9d Docu: model parameters 2024-02-08 09:22:29 +01:00
LangChain4j 49307755be Docu: all available model types 2024-02-08 09:22:29 +01:00
LangChain4j 7d54651f19 Docu: fixes 2024-02-08 09:22:29 +01:00
Carlos Zela Bueno 9ad53fd61d
[Docs] Summary table of the integration capabilities (#609)
Hi @LizeRaes 
- Updated main `README.md` to add summary table
- Updated integration overview table + current capabilities
documentation.
   https://langchain4j.github.io/langchain4j/docs/integrations/

This is in reference to
https://github.com/langchain4j/langchain4j/discussions/565

PS: Updated as of February 5, probably requires double checking to make
sure all checks are up to date. Anyway, the main idea is that this table
is updated frequently according to contributions :)

---------

Co-authored-by: LangChain4j <langchain4j@gmail.com>
Co-authored-by: Lize Raes <49833622+LizeRaes@users.noreply.github.com>
2024-02-07 17:54:21 +01:00
LangChain4j b36315056e Docu: added more info on ChatLanguageModel API and ChatMemory 2024-02-07 10:45:19 +01:00
Amith Koujalgi 31f0da6e94
Docs updates (#599)
- Updated docs GH workflow to build and publish javadoc alongside of
docs directory. This would make the docs available at
https://langchain4j.github.io/langchain4j and javadoc at
https://langchain4j.github.io/langchain4j/apidocs/index.html
- Updated javadoc build command in docs GH workflow to do a full project
build (that includes all modules and no exclusions).
- Updated javadoc build in docs GH workflow to run with Java 21 version.

This is in reference to
https://github.com/langchain4j/langchain4j/discussions/596

---------

Co-authored-by: Lize Raes <49833622+LizeRaes@users.noreply.github.com>
2024-02-06 11:13:41 +01:00
LangChain4j 34865af810 Docu: added more info on ChatLanguageModel API 2024-02-06 09:06:42 +01:00
LangChain4j cf684e9ed0 added example of returning POJOs to docu 2024-02-05 10:02:33 +01:00
LangChain4j 840080899c added examples of using embedding stores to docu 2024-02-05 10:02:23 +01:00
LangChain4j 50a617b11b added documentation on LanguageModel vs ChatLanguageModel 2024-02-05 09:54:09 +01:00
LangChain4j 96766f684b added features to documentation 2024-02-05 09:33:58 +01:00
LangChain4j 184348e947 added Useful Materials 2024-02-03 18:07:30 +01:00
LangChain4j b625dbcfe1 typo 2024-02-03 18:07:30 +01:00
LangChain4j f17f8349ac Docu: updates 2024-02-02 10:01:08 +01:00
LangChain4j 2b461a9b1a updated doc 2024-02-02 00:57:42 +01:00
LangChain4j 3014776f90 updated doc 2024-02-02 00:56:20 +01:00
LangChain4j 057730bc7b fix button link 2024-02-01 09:19:15 +01:00
LangChain4j 55a3d9060b fixed "Unexpected character `3` (U+0033) before name, expected a character that can start a name, such as a letter, `$`, or `_`" 2024-02-01 09:09:47 +01:00
LangChain4j 59eab0cecb Docu: updated introduction 2024-02-01 09:00:59 +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 a8ad9e48d9
Automate release (#562) 2024-01-30 07:20:20 +01:00
K. Siva Prasad Reddy 0eeb0340a0
Correcting the code snippets in the docs (#566) 2024-01-30 04:57:03 +01:00
LangChain4j 14fb985de0
Foundation for advanced RAG (#538)
So far, LangChain4j had only a simple (a.k.a., naive) RAG
implementation: a single `Retriever` was invoked on each interaction
with the LLM, and all retrieved `TextSegments` were appended to the end
of the `UserMessage`. This approach was very limiting.

This PR introduces support for much more advanced RAG use cases. The
design and mental model are inspired by [this
article](https://blog.langchain.dev/deconstructing-rag/) and [this
paper](https://arxiv.org/abs/2312.10997), making it advisable to read
the article.

This PR introduces a `RetrievalAugmentor` interface responsible for
augmenting a `UserMessage` with relevant content before sending it to
the LLM. The `RetrievalAugmentor` can be used with both `AiServices` and
`ConversationalRetrievalChain`, as well as stand-alone.

A default implementation of `RetrievalAugmentor`
(`DefaultRetrievalAugmentor`) is provided with the library and is
suggested as a good starting point. However, users are not limited to it
and can have more freedom with their own custom implementations.

`DefaultRetrievalAugmentor` decomposes the entire RAG flow into more
granular steps and base components:
- `QueryTransformer`
- `QueryRouter`
- `ContentRetriever` (the old `Retriever` is now deprecated)
- `ContentAggregator`
- `ContentInjector`

This modular design aims to separate concerns and simplify development,
testing, and evaluation. Most (if not all) currently known and proven
RAG techniques can be represented as one or multiple base components
listed above.

Here is how the decomposed RAG flow can be visualized:

![advanced-rag](https://github.com/langchain4j/langchain4j/assets/132277850/b699077d-dabf-4768-a241-3fcd9ab0286c)

This mental and software model aims to simplify the thinking, reasoning,
and implementation of advanced RAG flows.

Each base component listed above has a sensible and simple default
implementation configured in `DefaultRetrievalAugmentor` by default but
can be overridden by more sophisticated implementations (provided by the
library out-of-the-box) as well as custom ones. The list of
implementations is expected to grow over time as we discover new
techniques and implement existing proven ones.

This PR also introduces out-of-the-box support for the following proven
RAG techniques:
- Query expansion
- Query compression
- Query routing using LLM
- [Reciprocal Rank
Fusion](https://learn.microsoft.com/en-us/azure/search/hybrid-search-ranking)
- Re-ranking ([Cohere Rerank](https://docs.cohere.com/docs/reranking)
integration is coming in a [separate
PR](https://github.com/langchain4j/langchain4j/pull/539)).
2024-01-26 16:25:24 +01:00
Lize Raes 283107c8ce
add logging and model parameter tutorials to docu (#536)
Adding Model Parameter Setting tutorial and Logging explanation to
documentation
2024-01-24 08:28:45 +01:00
Lize Raes 88153721aa
action to build and publish javadoc to pages (#504)
Adds the following:

 * add maven plugin for generating javadoc 
 * action to build and publish javadoc to pages
 * update javadoc link in docusaurus
2024-01-12 12:50:44 +01:00
Amith Koujalgi aba5eeb925
Docu logos and domain (#503)
@LizeRaes Updated the images for the docs home page 🙂

Just had to convert the PNGs into SVGs as the `Svg` tag takes only image
as SVG.

---------

Co-authored-by: LizeRaes <49833622+LizeRaes@users.noreply.github.com>
2024-01-11 20:37:16 +01:00
Amith Koujalgi 7e42166109
Updated Docs (#500)
- Updated subpage 0 to `Overview` and made it the landing page upon
clicking `Tutorials` from the horizontal/navigation/top bar.
- Set up GitHub action to build and publish the docs to the GitHub pages
on release. [Preview](https://amithkoujalgi.github.io/langchain4j/) of
the docs on GitHub pages. This action/workflow can also be triggered
manually.
- Added content to `/integrations/language-models/ollama`

PS:
If GitHub pages has been enabled in the repository, the repo admin
should be able to run the new GitHub workflow/action in the Actions tab
and after the completion of the workflow, the docs should be available
in the link provided by GitHub (or a specified custom domain).
2024-01-11 09:04:38 +01:00
dependabot[bot] 93ff2f97f3
Bump follow-redirects from 1.15.3 to 1.15.4 in /docs (#480)
Bumps
[follow-redirects](https://github.com/follow-redirects/follow-redirects)
from 1.15.3 to 1.15.4.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="65858205e5"><code>6585820</code></a>
Release version 1.15.4 of the npm package.</li>
<li><a
href="7a6567e16d"><code>7a6567e</code></a>
Disallow bracketed hostnames.</li>
<li><a
href="05629af696"><code>05629af</code></a>
Prefer native URL instead of deprecated url.parse.</li>
<li><a
href="1cba8e85fa"><code>1cba8e8</code></a>
Prefer native URL instead of legacy url.resolve.</li>
<li><a
href="72bc2a4229"><code>72bc2a4</code></a>
Simplify _processResponse error handling.</li>
<li><a
href="3d42aecdca"><code>3d42aec</code></a>
Add bracket tests.</li>
<li><a
href="bcbb096b32"><code>bcbb096</code></a>
Do not directly set Error properties.</li>
<li>See full diff in <a
href="https://github.com/follow-redirects/follow-redirects/compare/v1.15.3...v1.15.4">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=follow-redirects&package-manager=npm_and_yarn&previous-version=1.15.3&new-version=1.15.4)](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-01-09 12:01:21 +01:00
Lize Raes ec7844719b
set up documentation structure (#473)
suggestion for documentation website layout
2024-01-09 09:47:56 +01:00
Amith Koujalgi a0c63b611e
Added skeleton structure for docs (#458)
Hi @LizeRaes,

In reference to
[this](https://github.com/langchain4j/langchain4j/discussions/429#discussioncomment-8025023),
I've added the skeleton structure for documentation under the `docs`
directory.

I've also updated the `README.md` under the `docs` directory to help in
setting up and running the docs.

It's straightforward to set up and run the docs locally to get a feel
for its appearance.

I've also attached a few screenshots of the pages to get a quick look at
the appearance.

Please have a look and do let me know what you think. Thanks!


**_Sample Images:_**

- Docs: Home/Landing Page

<img width="1792" alt="1"
src="https://github.com/langchain4j/langchain4j/assets/1876165/c2ff1bf3-a412-4d86-be0d-9937936ec533">

- Docs: Inner Page Sample

<img width="1792" alt="2"
src="https://github.com/langchain4j/langchain4j/assets/1876165/9166df41-f16a-4bff-a3ca-145364be475c">

- Docs: Sample Blog

<img width="1792" alt="3"
src="https://github.com/langchain4j/langchain4j/assets/1876165/44dc1e7c-f669-4806-acfe-8fc2c3d2f59b">

Co-authored-by: Amith Koujalgi <amith.koujalgi@razorthink.com>
2024-01-06 04:01:35 +01:00