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>
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 />
[](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>
<!-- 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 -->
<!-- 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 -->
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>
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!
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>
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>
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:

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)).
@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>
- 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).
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 />
[](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>