Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

community: update AzureSearch class to work with azure-search-documents=11.4.0 #15659

Merged
merged 16 commits into from
Feb 13, 2024

Conversation

lz-chen
Copy link
Contributor

@lz-chen lz-chen commented Jan 7, 2024

Copy link

vercel bot commented Jan 7, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
langchain ⬜️ Ignored (Inspect) Visit Preview Feb 12, 2024 11:40pm

@lz-chen
Copy link
Contributor Author

lz-chen commented Jan 7, 2024

Hello, there is a previous PR #13472 that provided some partial fix to the AzureSearch class but did not fully update the dependency. Now calling class as vector store still doesn't work in my case, with the same problems encontered by others in the issues mentioned in the description.
I'd like to contribute to update the dependency to azure-search-documents=11.4.0. However I am not sure if that means updating all the pyproject.toml and poetry.lock files that has azure-search-documents? What is the best way to do that? @efriis @hwchase17 Thanks in advance 😊

@efriis
Copy link
Member

efriis commented Jan 10, 2024

Hey @lz-chen ! You actually can't do this with a community integration, as it's not a concrete dependency. Unfortunately, people need to manage their other python package versions themselves.

A good addition would be a note in the documentation to upgrade that package!

@lz-chen
Copy link
Contributor Author

lz-chen commented Jan 10, 2024

@efriis Thanks for the reply 😊 What does that mean for this PR? Should I keep the changes I made in libs/community/langchain_community/vectorstores/azuresearch.py without updating the dependencies in libs/langchain/pyproject.toml and libs/langchain/poetry.lock?
Or follow what's done in PR #13472 to keep support for both azure-search-documents>=11.4.0 and azure-search-documents<11.4.0?

@lz-chen
Copy link
Contributor Author

lz-chen commented Jan 22, 2024

@efriis Could you give me some pointers on what I should do with this? As of now, the AzureSearch class in libs/community/langchain_community/vectorstores/azuresearch.py doesn't work with azure-search-documents version 11.4.0, which has been released for 2 months now. The older version 11.4.0b8 that langchain pinned to has some bugs and I can't keep using that.
If I can't make change in libs/langchain/pyproject.toml, should I make changes somewhere else? For example making contribution to langchain-community?

@HeidiSteen
Copy link
Contributor

@mattgotteiner for subject matter expertise on Azure Search SDK migration to 11.4 stable library. Agree with @lz-chen that the existing vector store integration module doesn't work with 11.4.0.

@mattgotteiner
Copy link
Contributor

@lz-chen thank you very much for doing this work.

@efriis Please let us know if there's any additional work required to get the PR merged.

community: query_language has been removed in azure-search-documents==11.4.0
@Skar0
Copy link
Contributor

Skar0 commented Jan 26, 2024

Hi @lz-chen,

Thanks for merging my PR into your update! I reviewed the original changes and tested them with azure-search-documents==11.4.0, and everything seems to work just fine :) My PR aimed to address a specific bug related to the removal of query_language in azure-search-documents==11.4.0. I'm happy to discuss any further details or assist with additional improvements if needed.

adamdougal added a commit to adamdougal/chat-with-your-data-solution-accelerator that referenced this pull request Jan 30, 2024
@hwchase17 hwchase17 closed this Jan 30, 2024
@baskaryan baskaryan reopened this Jan 30, 2024
adamdougal added a commit to adamdougal/chat-with-your-data-solution-accelerator that referenced this pull request Jan 31, 2024
adamdougal added a commit to adamdougal/chat-with-your-data-solution-accelerator that referenced this pull request Feb 1, 2024
github-merge-queue bot pushed a commit to Azure-Samples/chat-with-your-data-solution-accelerator that referenced this pull request Feb 1, 2024
* Bump to latest versions

* Downgrade azure-search-documents latest version is not compatible with
langchaig
- Discussion: langchain-ai/langchain#13245
- PR to fix: langchain-ai/langchain#15659

* Migrate to new content safety api

- Old: https://github.com/Azure-Samples/AzureAIContentSafety/blob/main/python/1.0.0b1/sample_analyze_text.py#L37
- New: https://github.com/Azure-Samples/AzureAIContentSafety/blob/main/python/1.0.0/sample_analyze_text.py#L39

* Downgrade openai

The changes are too vast to be included in this PR

* Bump dependencies

* Fix test and bump langchain to latest version
@pamelafox
Copy link
Contributor

Just looking at the discussion here about pyproject.toml-

It looks like the main langchain pyproject.toml doesn't reference azure-search-documents, which makes sense as this in community. However, I notice that the langchain-community pyproject.toml also doesn't reference azure-search-documents. I believe that it probably should, just based off similar recent integration updates, like this PR for Azure Document Intelligence:
#14389

The file to change:

azure-ai-documentintelligence = {version = "^1.0.0b1", optional = true}

Notably it'd be marked as optional=True, like the other community dependencies.

That's my suggestion after looking through how the packages are structured. Perhaps @efriis could confirm. Thanks!

@baskaryan
Copy link
Collaborator

Just looking at the discussion here about pyproject.toml-

It looks like the main langchain pyproject.toml doesn't reference azure-search-documents, which makes sense as this in community. However, I notice that the langchain-community pyproject.toml also doesn't reference azure-search-documents. I believe that it probably should, just based off similar recent integration updates, like this PR for Azure Document Intelligence: #14389

The file to change:

azure-ai-documentintelligence = {version = "^1.0.0b1", optional = true}

Notably it'd be marked as optional=True, like the other community dependencies.
That's my suggestion after looking through how the packages are structured. Perhaps @efriis could confirm. Thanks!

Optional dependencies only need to be included in pyproject if they're required for unit tests, so no need to add in this case!

@dosubot dosubot bot added the lgtm PR looks good. Use to confirm that a PR is ready for merging. label Feb 12, 2024
@pamelafox
Copy link
Contributor

@baskaryan Ah, thanks for clarifying, that explains why azure-document-intelligence was added in that PR, as it had a short unit test.

@baskaryan baskaryan merged commit 30af711 into langchain-ai:master Feb 13, 2024
58 checks passed
snsten pushed a commit to snsten/langchain that referenced this pull request Feb 15, 2024
…documents=11.4.0 (langchain-ai#15659)

- **Description:** Updates
`libs/community/langchain_community/vectorstores/azuresearch.py` to
support the stable version `azure-search-documents=11.4.0`
- **Issue:** langchain-ai#14534,
langchain-ai#15039,
langchain-ai#15355
  - **Dependencies:** azure-search-documents>=11.4.0

---------

Co-authored-by: Clément Tamines <Skar0@users.noreply.github.com>
Co-authored-by: Bagatur <baskaryan@gmail.com>
@mattgotteiner
Copy link
Contributor

apologies - but I think we need to follow up here. SearchField is still using vector_search_configuration when it should be vector_search_profile_name

@mattgotteiner
Copy link
Contributor

mattgotteiner commented Feb 15, 2024

We are also missing a from azure.search.documents.indexes.models import VectorSearch

@mattgotteiner
Copy link
Contributor

the import is only performed with typing.TYPE_CHECKING is true

@kristapratico
Copy link
Contributor

@mattgotteiner noticed these issues today as well and opened a PR to fix here: #17599

nicolewhite pushed a commit to autoblocksai/autoblocks-examples that referenced this pull request Feb 19, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[@types/node](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node)
([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node))
| [`20.11.17` ->
`20.11.19`](https://renovatebot.com/diffs/npm/@types%2fnode/20.11.17/20.11.19)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@types%2fnode/20.11.19?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@types%2fnode/20.11.19?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@types%2fnode/20.11.17/20.11.19?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@types%2fnode/20.11.17/20.11.19?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[@types/react](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react)
([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react))
| [`18.2.55` ->
`18.2.56`](https://renovatebot.com/diffs/npm/@types%2freact/18.2.55/18.2.56)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@types%2freact/18.2.56?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@types%2freact/18.2.56?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@types%2freact/18.2.55/18.2.56?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@types%2freact/18.2.55/18.2.56?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [langchain](https://togithub.com/langchain-ai/langchain) | `0.1.6` ->
`0.1.7` |
[![age](https://developer.mend.io/api/mc/badges/age/pypi/langchain/0.1.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/langchain/0.1.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/langchain/0.1.6/0.1.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/langchain/0.1.6/0.1.7?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[langchain](https://togithub.com/langchain-ai/langchainjs/tree/main/langchain/)
([source](https://togithub.com/langchain-ai/langchainjs)) | [`0.1.17` ->
`0.1.20`](https://renovatebot.com/diffs/npm/langchain/0.1.17/0.1.20) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/langchain/0.1.20?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/langchain/0.1.20?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/langchain/0.1.17/0.1.20?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/langchain/0.1.17/0.1.20?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [novel](https://novel.sh)
([source](https://togithub.com/steven-tey/novel)) | [`0.2.0` ->
`0.2.4`](https://renovatebot.com/diffs/npm/novel/0.2.0/0.2.4) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/novel/0.2.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/novel/0.2.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/novel/0.2.0/0.2.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/novel/0.2.0/0.2.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [openai](https://togithub.com/openai/openai-node) | [`4.27.1` ->
`4.28.0`](https://renovatebot.com/diffs/npm/openai/4.27.1/4.28.0) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/openai/4.28.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/openai/4.28.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/openai/4.27.1/4.28.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/openai/4.27.1/4.28.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
| [pytest](https://docs.pytest.org/en/latest/)
([source](https://togithub.com/pytest-dev/pytest),
[changelog](https://docs.pytest.org/en/stable/changelog.html)) | `8.0.0`
-> `8.0.1` |
[![age](https://developer.mend.io/api/mc/badges/age/pypi/pytest/8.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/pytest/8.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/pytest/8.0.0/8.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/pytest/8.0.0/8.0.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>langchain-ai/langchain (langchain)</summary>

###
[`v0.1.7`](https://togithub.com/langchain-ai/langchain/releases/tag/v0.1.7)

[Compare
Source](https://togithub.com/langchain-ai/langchain/compare/v0.1.6...v0.1.7)

#### What's Changed

- Added LangGraph in framework parts of readme file by
[@&#8203;kartheekyakkala](https://togithub.com/kartheekyakkala) in
[https://github.com/langchain-ai/langchain/pull/17279](https://togithub.com/langchain-ai/langchain/pull/17279)
- google-vertexai\[patch]: Fixed SafetySettings handling in streaming
API in VertexAI by [@&#8203;rubenhak](https://togithub.com/rubenhak) in
[https://github.com/langchain-ai/langchain/pull/17278](https://togithub.com/langchain-ai/langchain/pull/17278)
- google-genai\[patch]: fix streaming, function calling by
[@&#8203;efriis](https://togithub.com/efriis) in
[https://github.com/langchain-ai/langchain/pull/17268](https://togithub.com/langchain-ai/langchain/pull/17268)
- langchain_google_genai : Add missing \_identifying_params property. by
[@&#8203;GMartin-dev](https://togithub.com/GMartin-dev) in
[https://github.com/langchain-ai/langchain/pull/17224](https://togithub.com/langchain-ai/langchain/pull/17224)
- templates: simplify tool in gemini-functions-agent by
[@&#8203;efriis](https://togithub.com/efriis) in
[https://github.com/langchain-ai/langchain/pull/17282](https://togithub.com/langchain-ai/langchain/pull/17282)
- google-genai\[patch]: fix tool format, use protos by
[@&#8203;efriis](https://togithub.com/efriis) in
[https://github.com/langchain-ai/langchain/pull/17284](https://togithub.com/langchain-ai/langchain/pull/17284)
- templates: simplify tool in gemini-functions-agent 2 by
[@&#8203;efriis](https://togithub.com/efriis) in
[https://github.com/langchain-ai/langchain/pull/17283](https://togithub.com/langchain-ai/langchain/pull/17283)
- google-genai\[patch]: release 0.0.8 by
[@&#8203;efriis](https://togithub.com/efriis) in
[https://github.com/langchain-ai/langchain/pull/17285](https://togithub.com/langchain-ai/langchain/pull/17285)
- templates: gemini-functions-agent genai package bump by
[@&#8203;efriis](https://togithub.com/efriis) in
[https://github.com/langchain-ai/langchain/pull/17286](https://togithub.com/langchain-ai/langchain/pull/17286)
- CI: Update documentation template by
[@&#8203;eyurtsev](https://togithub.com/eyurtsev) in
[https://github.com/langchain-ai/langchain/pull/17325](https://togithub.com/langchain-ai/langchain/pull/17325)
- community\[patch]: Fix typo in milvus vectorstore by
[@&#8203;decentNick](https://togithub.com/decentNick) in
[https://github.com/langchain-ai/langchain/pull/17324](https://togithub.com/langchain-ai/langchain/pull/17324)
- core\[patch]: Add unit test to cover different streaming format for
json parsing by [@&#8203;eyurtsev](https://togithub.com/eyurtsev) in
[https://github.com/langchain-ai/langchain/pull/17063](https://togithub.com/langchain-ai/langchain/pull/17063)
- docstrings `core` update by
[@&#8203;leo-gan](https://togithub.com/leo-gan) in
[https://github.com/langchain-ai/langchain/pull/16813](https://togithub.com/langchain-ai/langchain/pull/16813)
- docstrings `community` update by
[@&#8203;leo-gan](https://togithub.com/leo-gan) in
[https://github.com/langchain-ai/langchain/pull/16810](https://togithub.com/langchain-ai/langchain/pull/16810)
- partner: nvidia-ai-endpoints model arguments (i.e. temperature) on
construction bug by [@&#8203;VKudlay](https://togithub.com/VKudlay) in
[https://github.com/langchain-ai/langchain/pull/17290](https://togithub.com/langchain-ai/langchain/pull/17290)
- nvidia-ai-endpoints\[patch]: release 0.0.3 by
[@&#8203;efriis](https://togithub.com/efriis) in
[https://github.com/langchain-ai/langchain/pull/17345](https://togithub.com/langchain-ai/langchain/pull/17345)
- templates: gemini-functions-agent readme update by
[@&#8203;efriis](https://togithub.com/efriis) in
[https://github.com/langchain-ai/langchain/pull/17288](https://togithub.com/langchain-ai/langchain/pull/17288)
- vertexai\[patch]: rm deps by
[@&#8203;baskaryan](https://togithub.com/baskaryan) in
[https://github.com/langchain-ai/langchain/pull/17077](https://togithub.com/langchain-ai/langchain/pull/17077)
- Upgrade configuration for Ruff v0.2.0 by
[@&#8203;charliermarsh](https://togithub.com/charliermarsh) in
[https://github.com/langchain-ai/langchain/pull/16905](https://togithub.com/langchain-ai/langchain/pull/16905)
- Modify LLMs/Anyscale work with OpenAI API v1 by
[@&#8203;kylehh](https://togithub.com/kylehh) in
[https://github.com/langchain-ai/langchain/pull/14206](https://togithub.com/langchain-ai/langchain/pull/14206)
- Make some functions work with Milvus by
[@&#8203;hoanq1811](https://togithub.com/hoanq1811) in
[https://github.com/langchain-ai/langchain/pull/10695](https://togithub.com/langchain-ai/langchain/pull/10695)
- community\[patch]: Fix Milvus add texts when ids=None by
[@&#8203;jaelgu](https://togithub.com/jaelgu) in
[https://github.com/langchain-ai/langchain/pull/17021](https://togithub.com/langchain-ai/langchain/pull/17021)
- infra: add print rule to ruff by
[@&#8203;efriis](https://togithub.com/efriis) in
[https://github.com/langchain-ai/langchain/pull/16221](https://togithub.com/langchain-ai/langchain/pull/16221)
- Support serialization when inputs/outputs contain generators by
[@&#8203;hinthornw](https://togithub.com/hinthornw) in
[https://github.com/langchain-ai/langchain/pull/17338](https://togithub.com/langchain-ai/langchain/pull/17338)
- infra: no print in newer partner packages by
[@&#8203;efriis](https://togithub.com/efriis) in
[https://github.com/langchain-ai/langchain/pull/17353](https://togithub.com/langchain-ai/langchain/pull/17353)
- cli\[patch]: integration template nits by
[@&#8203;baskaryan](https://togithub.com/baskaryan) in
[https://github.com/langchain-ai/langchain/pull/14691](https://togithub.com/langchain-ai/langchain/pull/14691)
- Update chat_models.py by
[@&#8203;mlFanatic](https://togithub.com/mlFanatic) in
[https://github.com/langchain-ai/langchain/pull/16924](https://togithub.com/langchain-ai/langchain/pull/16924)
- Improve graph cypher qa prompt by
[@&#8203;tomasonjo](https://togithub.com/tomasonjo) in
[https://github.com/langchain-ai/langchain/pull/17380](https://togithub.com/langchain-ai/langchain/pull/17380)
- Updated doc for tools/pubmed with new functions: invoke. by
[@&#8203;PennlaineChu](https://togithub.com/PennlaineChu) in
[https://github.com/langchain-ai/langchain/pull/17378](https://togithub.com/langchain-ai/langchain/pull/17378)
- docs: update documentation for file system tool integration by
[@&#8203;jiangzf93](https://togithub.com/jiangzf93) in
[https://github.com/langchain-ai/langchain/pull/17377](https://togithub.com/langchain-ai/langchain/pull/17377)
- community: add gpt-4-turbo and gpt-4-0125 costs by
[@&#8203;mspronesti](https://togithub.com/mspronesti) in
[https://github.com/langchain-ai/langchain/pull/17349](https://togithub.com/langchain-ai/langchain/pull/17349)
- tools:docs: update google_search.ipynb - change tool name by
[@&#8203;jexp](https://togithub.com/jexp) in
[https://github.com/langchain-ai/langchain/pull/17354](https://togithub.com/langchain-ai/langchain/pull/17354)
- Update �Docs for TFIDFRetriever Import Path by
[@&#8203;ByeongUkChoi](https://togithub.com/ByeongUkChoi) in
[https://github.com/langchain-ai/langchain/pull/17322](https://togithub.com/langchain-ai/langchain/pull/17322)
- add self discover notebook by
[@&#8203;hwchase17](https://togithub.com/hwchase17) in
[https://github.com/langchain-ai/langchain/pull/17387](https://togithub.com/langchain-ai/langchain/pull/17387)
- openai\[patch]: code cleaning by
[@&#8203;efriis](https://togithub.com/efriis) in
[https://github.com/langchain-ai/langchain/pull/17355](https://togithub.com/langchain-ai/langchain/pull/17355)
- community: Add mmr and similarity_score_threshold retrieval to
DatabricksVectorSearch by
[@&#8203;david-tempelmann](https://togithub.com/david-tempelmann) in
[https://github.com/langchain-ai/langchain/pull/16829](https://togithub.com/langchain-ai/langchain/pull/16829)
- community: AWS Athena Document Loader by
[@&#8203;abhijeethp](https://togithub.com/abhijeethp) in
[https://github.com/langchain-ai/langchain/pull/15625](https://togithub.com/langchain-ai/langchain/pull/15625)
- google-genai\[minor]: add safety settings by
[@&#8203;Adi8885](https://togithub.com/Adi8885) in
[https://github.com/langchain-ai/langchain/pull/16836](https://togithub.com/langchain-ai/langchain/pull/16836)
- community: fixed vector similarity filtering by
[@&#8203;ablacklama](https://togithub.com/ablacklama) in
[https://github.com/langchain-ai/langchain/pull/16967](https://togithub.com/langchain-ai/langchain/pull/16967)
- community\[patch]: remove print by
[@&#8203;baskaryan](https://togithub.com/baskaryan) in
[https://github.com/langchain-ai/langchain/pull/17435](https://togithub.com/langchain-ai/langchain/pull/17435)
- docs: fix typo in vikingdb.ipynb by
[@&#8203;eltociear](https://togithub.com/eltociear) in
[https://github.com/langchain-ai/langchain/pull/17429](https://togithub.com/langchain-ai/langchain/pull/17429)
- infra: update pr template by
[@&#8203;baskaryan](https://togithub.com/baskaryan) in
[https://github.com/langchain-ai/langchain/pull/17437](https://togithub.com/langchain-ai/langchain/pull/17437)
- infra: pr template nit by
[@&#8203;baskaryan](https://togithub.com/baskaryan) in
[https://github.com/langchain-ai/langchain/pull/17438](https://togithub.com/langchain-ai/langchain/pull/17438)
- Updated docs for sitemap loader to use correct URL by
[@&#8203;PennlaineChu](https://togithub.com/PennlaineChu) in
[https://github.com/langchain-ai/langchain/pull/17395](https://togithub.com/langchain-ai/langchain/pull/17395)
- docs:fix typo in question_answering quickstart.ipynb by
[@&#8203;minseon9](https://togithub.com/minseon9) in
[https://github.com/langchain-ai/langchain/pull/17393](https://togithub.com/langchain-ai/langchain/pull/17393)
- community watsonx\[patch]: Invoke callback prior to yielding token by
[@&#8203;h0rv](https://togithub.com/h0rv) in
[https://github.com/langchain-ai/langchain/pull/17346](https://togithub.com/langchain-ai/langchain/pull/17346)
- community\[patch]: doc loaders mypy fixes by
[@&#8203;h0rv](https://togithub.com/h0rv) in
[https://github.com/langchain-ai/langchain/pull/17368](https://togithub.com/langchain-ai/langchain/pull/17368)
- Updated doc for integrations/chat/anthropic_functions
[#&#8203;15664](https://togithub.com/langchain-ai/langchain/issues/15664)
by [@&#8203;Naveenkhasyap](https://togithub.com/Naveenkhasyap) in
[https://github.com/langchain-ai/langchain/pull/17226](https://togithub.com/langchain-ai/langchain/pull/17226)
- community\[patch]: give reranker default client val by
[@&#8203;baskaryan](https://togithub.com/baskaryan) in
[https://github.com/langchain-ai/langchain/pull/17289](https://togithub.com/langchain-ai/langchain/pull/17289)
- docs `Redis` page update by
[@&#8203;leo-gan](https://togithub.com/leo-gan) in
[https://github.com/langchain-ai/langchain/pull/16906](https://togithub.com/langchain-ai/langchain/pull/16906)
- community:Add Pagination to GitHubIssuesLoader for Efficient GitHub
Issues Retrieval by [@&#8203;xiaokuili](https://togithub.com/xiaokuili)
in
[https://github.com/langchain-ai/langchain/pull/16934](https://togithub.com/langchain-ai/langchain/pull/16934)
- core\[patch]: Replace memory stream implementation used by
LogStreamCallbackHandler by
[@&#8203;eyurtsev](https://togithub.com/eyurtsev) in
[https://github.com/langchain-ai/langchain/pull/17185](https://togithub.com/langchain-ai/langchain/pull/17185)
- Add async methods to InMemoryCache by
[@&#8203;cbornet](https://togithub.com/cbornet) in
[https://github.com/langchain-ai/langchain/pull/17425](https://togithub.com/langchain-ai/langchain/pull/17425)
- Add async methods to VectorStoreQATool by
[@&#8203;cbornet](https://togithub.com/cbornet) in
[https://github.com/langchain-ai/langchain/pull/16949](https://togithub.com/langchain-ai/langchain/pull/16949)
- community ollama\[patch]: Invoke callback prior to yielding token by
[@&#8203;h0rv](https://togithub.com/h0rv) in
[https://github.com/langchain-ai/langchain/pull/17348](https://togithub.com/langchain-ai/langchain/pull/17348)
- community: update AzureSearch class to work with
azure-search-documents=11.4.0 by
[@&#8203;lz-chen](https://togithub.com/lz-chen) in
[https://github.com/langchain-ai/langchain/pull/15659](https://togithub.com/langchain-ai/langchain/pull/15659)
- docs: optimize memory usage by
[@&#8203;Undertone0809](https://togithub.com/Undertone0809) in
[https://github.com/langchain-ai/langchain/pull/16876](https://togithub.com/langchain-ai/langchain/pull/16876)
- \[community] docs: another auth method for ElasticsearchStore by
[@&#8203;maxjakob](https://togithub.com/maxjakob) in
[https://github.com/langchain-ai/langchain/pull/16831](https://togithub.com/langchain-ai/langchain/pull/16831)
- core: unit testing `check_package_version` by
[@&#8203;jamesbraza](https://togithub.com/jamesbraza) in
[https://github.com/langchain-ai/langchain/pull/16825](https://togithub.com/langchain-ai/langchain/pull/16825)
- make `.gitignore` consistent with standard python gitignore by
[@&#8203;Bhupesh-V](https://togithub.com/Bhupesh-V) in
[https://github.com/langchain-ai/langchain/pull/16828](https://togithub.com/langchain-ai/langchain/pull/16828)
- community: Enhancement/add proxy support playwrighturlloader 16751 by
[@&#8203;xiaokuili](https://togithub.com/xiaokuili) in
[https://github.com/langchain-ai/langchain/pull/16822](https://togithub.com/langchain-ai/langchain/pull/16822)
- community: add delete method to rocksetdb vectorstore to support
recordmanager by [@&#8203;morganda](https://togithub.com/morganda) in
[https://github.com/langchain-ai/langchain/pull/17030](https://togithub.com/langchain-ai/langchain/pull/17030)
- Community: Fix github search issues and PRs PaginatedList has no len()
error by [@&#8203;dbfr3qs](https://togithub.com/dbfr3qs) in
[https://github.com/langchain-ai/langchain/pull/16806](https://togithub.com/langchain-ai/langchain/pull/16806)
- community\[fix] - in FAISS vector store, support passing custom
DocStore implementation when using from_xxx methods by
[@&#8203;ksachdeva](https://togithub.com/ksachdeva) in
[https://github.com/langchain-ai/langchain/pull/16801](https://togithub.com/langchain-ai/langchain/pull/16801)
- Core: Support .yml extension for YAML by
[@&#8203;TykanN](https://togithub.com/TykanN) in
[https://github.com/langchain-ai/langchain/pull/16783](https://togithub.com/langchain-ai/langchain/pull/16783)
- community/SQLDatabase: Generalize and trim software tests by
[@&#8203;amotl](https://togithub.com/amotl) in
[https://github.com/langchain-ai/langchain/pull/16659](https://togithub.com/langchain-ai/langchain/pull/16659)
- feat(langchain): add FlashRank ranker by
[@&#8203;mspronesti](https://togithub.com/mspronesti) in
[https://github.com/langchain-ai/langchain/pull/16785](https://togithub.com/langchain-ai/langchain/pull/16785)
- \[Community] infinity embeddings: update incorrect default url by
[@&#8203;michaelfeil](https://togithub.com/michaelfeil) in
[https://github.com/langchain-ai/langchain/pull/16759](https://togithub.com/langchain-ai/langchain/pull/16759)
- Langchain by [@&#8203;mhavey](https://togithub.com/mhavey) in
[https://github.com/langchain-ai/langchain/pull/16650](https://togithub.com/langchain-ai/langchain/pull/16650)
- docs: Fix broken link in LLMs index.mdx by
[@&#8203;sheilnaik](https://togithub.com/sheilnaik) in
[https://github.com/langchain-ai/langchain/pull/16557](https://togithub.com/langchain-ai/langchain/pull/16557)
- docs: Fix broken link in summarization use-case by
[@&#8203;pdsouza](https://togithub.com/pdsouza) in
[https://github.com/langchain-ai/langchain/pull/16554](https://togithub.com/langchain-ai/langchain/pull/16554)
- community: Add pebblo safe document loader by
[@&#8203;srics](https://togithub.com/srics) in
[https://github.com/langchain-ai/langchain/pull/16862](https://togithub.com/langchain-ai/langchain/pull/16862)
- community: Fixed the 'aembed' method of 'CohereEmbeddings'. by
[@&#8203;abhi922](https://togithub.com/abhi922) in
[https://github.com/langchain-ai/langchain/pull/16497](https://togithub.com/langchain-ai/langchain/pull/16497)
- experimental\[patch]: fix zero-shot pandas agent by
[@&#8203;baskaryan](https://togithub.com/baskaryan) in
[https://github.com/langchain-ai/langchain/pull/17442](https://togithub.com/langchain-ai/langchain/pull/17442)
- langchain\[patch], templates\[patch]: fix multi query retriever, web
re… by [@&#8203;baskaryan](https://togithub.com/baskaryan) in
[https://github.com/langchain-ai/langchain/pull/17434](https://togithub.com/langchain-ai/langchain/pull/17434)
- docs: add use case for managing chat messages via Apache Kafka by
[@&#8203;merlin-quix](https://togithub.com/merlin-quix) in
[https://github.com/langchain-ai/langchain/pull/16771](https://togithub.com/langchain-ai/langchain/pull/16771)
- Framework for supporting more languages in LanguageParser by
[@&#8203;ThatsJustCheesy](https://togithub.com/ThatsJustCheesy) in
[https://github.com/langchain-ai/langchain/pull/13318](https://togithub.com/langchain-ai/langchain/pull/13318)
- core: improve None value processing in merge_dicts() by
[@&#8203;skozlovf](https://togithub.com/skozlovf) in
[https://github.com/langchain-ai/langchain/pull/17462](https://togithub.com/langchain-ai/langchain/pull/17462)
- google-genai\[patch]: release 0.0.9, safety settings docs by
[@&#8203;efriis](https://togithub.com/efriis) in
[https://github.com/langchain-ai/langchain/pull/17432](https://togithub.com/langchain-ai/langchain/pull/17432)
- pinecone\[patch]: release 0.0.2rc0, remove simsimd dep by
[@&#8203;efriis](https://togithub.com/efriis) in
[https://github.com/langchain-ai/langchain/pull/17469](https://togithub.com/langchain-ai/langchain/pull/17469)
- pinecone\[patch]: poetry update by
[@&#8203;efriis](https://togithub.com/efriis) in
[https://github.com/langchain-ai/langchain/pull/17471](https://togithub.com/langchain-ai/langchain/pull/17471)
- Langchain: Ensure that the Elasticsearch Query Translator functions
accurately w… by [@&#8203;khabouss](https://togithub.com/khabouss) in
[https://github.com/langchain-ai/langchain/pull/17044](https://togithub.com/langchain-ai/langchain/pull/17044)
- Community: integrate chat models with Yuan2.0 by
[@&#8203;cauwulixuan](https://togithub.com/cauwulixuan) in
[https://github.com/langchain-ai/langchain/pull/16575](https://togithub.com/langchain-ai/langchain/pull/16575)
- Langchain: Fix to avoid infinite loop during collapse chain in map
reduce by [@&#8203;whchun](https://togithub.com/whchun) in
[https://github.com/langchain-ai/langchain/pull/16253](https://togithub.com/langchain-ai/langchain/pull/16253)
- openai\[patch]: relax tiktoken constraint, release 0.0.6 by
[@&#8203;efriis](https://togithub.com/efriis) in
[https://github.com/langchain-ai/langchain/pull/17472](https://togithub.com/langchain-ai/langchain/pull/17472)
- pinecone\[patch]: release 0.0.2 by
[@&#8203;efriis](https://togithub.com/efriis) in
[https://github.com/langchain-ai/langchain/pull/17477](https://togithub.com/langchain-ai/langchain/pull/17477)
- infra: azure release integration testing secrets by
[@&#8203;efriis](https://togithub.com/efriis) in
[https://github.com/langchain-ai/langchain/pull/17476](https://togithub.com/langchain-ai/langchain/pull/17476)
- \[community] ElasticsearchStore: preserve user headers by
[@&#8203;maxjakob](https://togithub.com/maxjakob) in
[https://github.com/langchain-ai/langchain/pull/16830](https://togithub.com/langchain-ai/langchain/pull/16830)
- core\[patch]: Release 0.1.23 by
[@&#8203;baskaryan](https://togithub.com/baskaryan) in
[https://github.com/langchain-ai/langchain/pull/17479](https://togithub.com/langchain-ai/langchain/pull/17479)
- community\[patch]: Release 0.0.20 by
[@&#8203;baskaryan](https://togithub.com/baskaryan) in
[https://github.com/langchain-ai/langchain/pull/17480](https://togithub.com/langchain-ai/langchain/pull/17480)
- langchain\[patch]: Release 0.1.7 by
[@&#8203;baskaryan](https://togithub.com/baskaryan) in
[https://github.com/langchain-ai/langchain/pull/17482](https://togithub.com/langchain-ai/langchain/pull/17482)
- experimental\[patch]: Release 0.0.51 by
[@&#8203;baskaryan](https://togithub.com/baskaryan) in
[https://github.com/langchain-ai/langchain/pull/17484](https://togithub.com/langchain-ai/langchain/pull/17484)

#### New Contributors

- [@&#8203;rubenhak](https://togithub.com/rubenhak) made their first
contribution in
[https://github.com/langchain-ai/langchain/pull/17278](https://togithub.com/langchain-ai/langchain/pull/17278)
- [@&#8203;decentNick](https://togithub.com/decentNick) made their first
contribution in
[https://github.com/langchain-ai/langchain/pull/17324](https://togithub.com/langchain-ai/langchain/pull/17324)
- [@&#8203;charliermarsh](https://togithub.com/charliermarsh) made their
first contribution in
[https://github.com/langchain-ai/langchain/pull/16905](https://togithub.com/langchain-ai/langchain/pull/16905)
- [@&#8203;hoanq1811](https://togithub.com/hoanq1811) made their first
contribution in
[https://github.com/langchain-ai/langchain/pull/10695](https://togithub.com/langchain-ai/langchain/pull/10695)
- [@&#8203;mlFanatic](https://togithub.com/mlFanatic) made their first
contribution in
[https://github.com/langchain-ai/langchain/pull/16924](https://togithub.com/langchain-ai/langchain/pull/16924)
- [@&#8203;PennlaineChu](https://togithub.com/PennlaineChu) made their
first contribution in
[https://github.com/langchain-ai/langchain/pull/17378](https://togithub.com/langchain-ai/langchain/pull/17378)
- [@&#8203;jiangzf93](https://togithub.com/jiangzf93) made their first
contribution in
[https://github.com/langchain-ai/langchain/pull/17377](https://togithub.com/langchain-ai/langchain/pull/17377)
- [@&#8203;david-tempelmann](https://togithub.com/david-tempelmann) made
their first contribution in
[https://github.com/langchain-ai/langchain/pull/16829](https://togithub.com/langchain-ai/langchain/pull/16829)
- [@&#8203;abhijeethp](https://togithub.com/abhijeethp) made their first
contribution in
[https://github.com/langchain-ai/langchain/pull/15625](https://togithub.com/langchain-ai/langchain/pull/15625)
- [@&#8203;ablacklama](https://togithub.com/ablacklama) made their first
contribution in
[https://github.com/langchain-ai/langchain/pull/16967](https://togithub.com/langchain-ai/langchain/pull/16967)
- [@&#8203;minseon9](https://togithub.com/minseon9) made their first
contribution in
[https://github.com/langchain-ai/langchain/pull/17393](https://togithub.com/langchain-ai/langchain/pull/17393)
- [@&#8203;h0rv](https://togithub.com/h0rv) made their first
contribution in
[https://github.com/langchain-ai/langchain/pull/17346](https://togithub.com/langchain-ai/langchain/pull/17346)
- [@&#8203;Naveenkhasyap](https://togithub.com/Naveenkhasyap) made their
first contribution in
[https://github.com/langchain-ai/langchain/pull/17226](https://togithub.com/langchain-ai/langchain/pull/17226)
- [@&#8203;lz-chen](https://togithub.com/lz-chen) made their first
contribution in
[https://github.com/langchain-ai/langchain/pull/15659](https://togithub.com/langchain-ai/langchain/pull/15659)
- [@&#8203;Bhupesh-V](https://togithub.com/Bhupesh-V) made their first
contribution in
[https://github.com/langchain-ai/langchain/pull/16828](https://togithub.com/langchain-ai/langchain/pull/16828)
- [@&#8203;morganda](https://togithub.com/morganda) made their first
contribution in
[https://github.com/langchain-ai/langchain/pull/17030](https://togithub.com/langchain-ai/langchain/pull/17030)
- [@&#8203;dbfr3qs](https://togithub.com/dbfr3qs) made their first
contribution in
[https://github.com/langchain-ai/langchain/pull/16806](https://togithub.com/langchain-ai/langchain/pull/16806)
- [@&#8203;TykanN](https://togithub.com/TykanN) made their first
contribution in
[https://github.com/langchain-ai/langchain/pull/16783](https://togithub.com/langchain-ai/langchain/pull/16783)
- [@&#8203;mhavey](https://togithub.com/mhavey) made their first
contribution in
[https://github.com/langchain-ai/langchain/pull/16650](https://togithub.com/langchain-ai/langchain/pull/16650)
- [@&#8203;sheilnaik](https://togithub.com/sheilnaik) made their first
contribution in
[https://github.com/langchain-ai/langchain/pull/16557](https://togithub.com/langchain-ai/langchain/pull/16557)
- [@&#8203;pdsouza](https://togithub.com/pdsouza) made their first
contribution in
[https://github.com/langchain-ai/langchain/pull/16554](https://togithub.com/langchain-ai/langchain/pull/16554)
- [@&#8203;srics](https://togithub.com/srics) made their first
contribution in
[https://github.com/langchain-ai/langchain/pull/16862](https://togithub.com/langchain-ai/langchain/pull/16862)
- [@&#8203;abhi922](https://togithub.com/abhi922) made their first
contribution in
[https://github.com/langchain-ai/langchain/pull/16497](https://togithub.com/langchain-ai/langchain/pull/16497)
- [@&#8203;merlin-quix](https://togithub.com/merlin-quix) made their
first contribution in
[https://github.com/langchain-ai/langchain/pull/16771](https://togithub.com/langchain-ai/langchain/pull/16771)
- [@&#8203;ThatsJustCheesy](https://togithub.com/ThatsJustCheesy) made
their first contribution in
[https://github.com/langchain-ai/langchain/pull/13318](https://togithub.com/langchain-ai/langchain/pull/13318)
- [@&#8203;khabouss](https://togithub.com/khabouss) made their first
contribution in
[https://github.com/langchain-ai/langchain/pull/17044](https://togithub.com/langchain-ai/langchain/pull/17044)
- [@&#8203;cauwulixuan](https://togithub.com/cauwulixuan) made their
first contribution in
[https://github.com/langchain-ai/langchain/pull/16575](https://togithub.com/langchain-ai/langchain/pull/16575)
- [@&#8203;whchun](https://togithub.com/whchun) made their first
contribution in
[https://github.com/langchain-ai/langchain/pull/16253](https://togithub.com/langchain-ai/langchain/pull/16253)

**Full Changelog**:
https://github.com/langchain-ai/langchain/compare/v0.1.6...v0.1.7

</details>

<details>
<summary>langchain-ai/langchainjs (langchain)</summary>

###
[`v0.1.20`](https://togithub.com/langchain-ai/langchainjs/releases/tag/0.1.20)

[Compare
Source](https://togithub.com/langchain-ai/langchainjs/compare/0.1.19...0.1.20)

#### What's Changed

- langchain\[patch]: Release 0.1.19 by
[@&#8203;jacoblee93](https://togithub.com/jacoblee93) in
[https://github.com/langchain-ai/langchainjs/pull/4428](https://togithub.com/langchain-ai/langchainjs/pull/4428)
- core\[minor]: Improve error handling by
[@&#8203;dqbd](https://togithub.com/dqbd) in
[https://github.com/langchain-ai/langchainjs/pull/4435](https://togithub.com/langchain-ai/langchainjs/pull/4435)
- langchain\[patch]: Make AgentExecutor pass config object through to
tools by [@&#8203;jacoblee93](https://togithub.com/jacoblee93) in
[https://github.com/langchain-ai/langchainjs/pull/4436](https://togithub.com/langchain-ai/langchainjs/pull/4436)
- community\[patch], azure-openai\[patch]: tag langchainjs in azure
integrations calls by [@&#8203;sinedied](https://togithub.com/sinedied)
in
[https://github.com/langchain-ai/langchainjs/pull/4411](https://togithub.com/langchain-ai/langchainjs/pull/4411)
- azure-openai\[patch]: Release 0.0.2 by
[@&#8203;jacoblee93](https://togithub.com/jacoblee93) in
[https://github.com/langchain-ai/langchainjs/pull/4437](https://togithub.com/langchain-ai/langchainjs/pull/4437)
- community\[patch]: add neo4j-graph generics, don't swallow query
execution errors by
[@&#8203;adam-cowley](https://togithub.com/adam-cowley) in
[https://github.com/langchain-ai/langchainjs/pull/4434](https://togithub.com/langchain-ai/langchainjs/pull/4434)
- langchain\[patch]: Upgrade Google Cloud Storage dependency by
[@&#8203;JackEdgar](https://togithub.com/JackEdgar) in
[https://github.com/langchain-ai/langchainjs/pull/4368](https://togithub.com/langchain-ai/langchainjs/pull/4368)
- langchain\[minor]: Fix missing traces when traceable used in
runOnDataset, API update by [@&#8203;dqbd](https://togithub.com/dqbd) in
[https://github.com/langchain-ai/langchainjs/pull/4430](https://togithub.com/langchain-ai/langchainjs/pull/4430)
- community\[minor]: add CassandraKVStore by
[@&#8203;mieslep](https://togithub.com/mieslep) in
[https://github.com/langchain-ai/langchainjs/pull/4418](https://togithub.com/langchain-ai/langchainjs/pull/4418)
- core\[patch]: Release 0.1.30 by
[@&#8203;jacoblee93](https://togithub.com/jacoblee93) in
[https://github.com/langchain-ai/langchainjs/pull/4438](https://togithub.com/langchain-ai/langchainjs/pull/4438)
- community\[patch]: Release 0.0.30 by
[@&#8203;jacoblee93](https://togithub.com/jacoblee93) in
[https://github.com/langchain-ai/langchainjs/pull/4439](https://togithub.com/langchain-ai/langchainjs/pull/4439)

#### New Contributors

- [@&#8203;adam-cowley](https://togithub.com/adam-cowley) made their
first contribution in
[https://github.com/langchain-ai/langchainjs/pull/4434](https://togithub.com/langchain-ai/langchainjs/pull/4434)
- [@&#8203;JackEdgar](https://togithub.com/JackEdgar) made their first
contribution in
[https://github.com/langchain-ai/langchainjs/pull/4368](https://togithub.com/langchain-ai/langchainjs/pull/4368)

**Full Changelog**:
https://github.com/langchain-ai/langchainjs/compare/0.1.19...0.1.20

###
[`v0.1.19`](https://togithub.com/langchain-ai/langchainjs/releases/tag/0.1.19)

[Compare
Source](https://togithub.com/langchain-ai/langchainjs/compare/0.1.18...0.1.19)

#### What's Changed

- langchain\[patch]: Release 0.1.18 by
[@&#8203;jacoblee93](https://togithub.com/jacoblee93) in
[https://github.com/langchain-ai/langchainjs/pull/4403](https://togithub.com/langchain-ai/langchainjs/pull/4403)
- cloudflare\[patch]: Release 0.0.3 by
[@&#8203;jacoblee93](https://togithub.com/jacoblee93) in
[https://github.com/langchain-ai/langchainjs/pull/4404](https://togithub.com/langchain-ai/langchainjs/pull/4404)
- Use onRunCreate by [@&#8203;hinthornw](https://togithub.com/hinthornw)
in
[https://github.com/langchain-ai/langchainjs/pull/4405](https://togithub.com/langchain-ai/langchainjs/pull/4405)
- langchain\[patch], core\[patch], community\[patch]: Bump LangSmith
versions by [@&#8203;jacoblee93](https://togithub.com/jacoblee93) in
[https://github.com/langchain-ai/langchainjs/pull/4414](https://togithub.com/langchain-ai/langchainjs/pull/4414)
- core\[patch]: Make custom tools pass raw config to functions by
[@&#8203;jacoblee93](https://togithub.com/jacoblee93) in
[https://github.com/langchain-ai/langchainjs/pull/4419](https://togithub.com/langchain-ai/langchainjs/pull/4419)
- docs\[patch]: Add warnings about SQL Injection for Postgres
integrations by [@&#8203;MJDeligan](https://togithub.com/MJDeligan) in
[https://github.com/langchain-ai/langchainjs/pull/4398](https://togithub.com/langchain-ai/langchainjs/pull/4398)
- community\[patch]: Remove deprecated call of serializable.js by
[@&#8203;mkesper](https://togithub.com/mkesper) in
[https://github.com/langchain-ai/langchainjs/pull/4410](https://togithub.com/langchain-ai/langchainjs/pull/4410)
- core\[patch]: Add optional type param to JsonOutputParser by
[@&#8203;jacoblee93](https://togithub.com/jacoblee93) in
[https://github.com/langchain-ai/langchainjs/pull/4420](https://togithub.com/langchain-ai/langchainjs/pull/4420)
- Improve developer-facing evaluations API by
[@&#8203;dqbd](https://togithub.com/dqbd) in
[https://github.com/langchain-ai/langchainjs/pull/4370](https://togithub.com/langchain-ai/langchainjs/pull/4370)
- docs\[minor]: Fix broken link used in quickstart by
[@&#8203;rogerthatdev](https://togithub.com/rogerthatdev) in
[https://github.com/langchain-ai/langchainjs/pull/4422](https://togithub.com/langchain-ai/langchainjs/pull/4422)
- langchain\[minor]: Couchbase document loader by
[@&#8203;lokesh-couchbase](https://togithub.com/lokesh-couchbase) in
[https://github.com/langchain-ai/langchainjs/pull/4364](https://togithub.com/langchain-ai/langchainjs/pull/4364)
- core\[patch]: Release 0.1.29 by
[@&#8203;jacoblee93](https://togithub.com/jacoblee93) in
[https://github.com/langchain-ai/langchainjs/pull/4424](https://togithub.com/langchain-ai/langchainjs/pull/4424)
- community\[patch], langchain\[patch]: Bump core versions by
[@&#8203;jacoblee93](https://togithub.com/jacoblee93) in
[https://github.com/langchain-ai/langchainjs/pull/4425](https://togithub.com/langchain-ai/langchainjs/pull/4425)
- community\[patch]: Release 0.0.29 by
[@&#8203;jacoblee93](https://togithub.com/jacoblee93) in
[https://github.com/langchain-ai/langchainjs/pull/4426](https://togithub.com/langchain-ai/langchainjs/pull/4426)
- langchain\[patch]: Bump community by
[@&#8203;jacoblee93](https://togithub.com/jacoblee93) in
[https://github.com/langchain-ai/langchainjs/pull/4427](https://togithub.com/langchain-ai/langchainjs/pull/4427)

#### New Contributors

- [@&#8203;rogerthatdev](https://togithub.com/rogerthatdev) made their
first contribution in
[https://github.com/langchain-ai/langchainjs/pull/4422](https://togithub.com/langchain-ai/langchainjs/pull/4422)
- [@&#8203;lokesh-couchbase](https://togithub.com/lokesh-couchbase) made
their first contribution in
[https://github.com/langchain-ai/langchainjs/pull/4364](https://togithub.com/langchain-ai/langchainjs/pull/4364)

**Full Changelog**:
https://github.com/langchain-ai/langchainjs/compare/0.1.18...0.1.19

###
[`v0.1.18`](https://togithub.com/langchain-ai/langchainjs/releases/tag/0.1.18)

[Compare
Source](https://togithub.com/langchain-ai/langchainjs/compare/0.1.17...0.1.18)

#### What's Changed

- langchain\[patch]: Release 0.1.16 by
[@&#8203;jacoblee93](https://togithub.com/jacoblee93) in
[https://github.com/langchain-ai/langchainjs/pull/4334](https://togithub.com/langchain-ai/langchainjs/pull/4334)
- Correct waitlist instruction in README by
[@&#8203;eknuth](https://togithub.com/eknuth) in
[https://github.com/langchain-ai/langchainjs/pull/4335](https://togithub.com/langchain-ai/langchainjs/pull/4335)
- docs\[patch]: Fix broken link by
[@&#8203;jacoblee93](https://togithub.com/jacoblee93) in
[https://github.com/langchain-ai/langchainjs/pull/4336](https://togithub.com/langchain-ai/langchainjs/pull/4336)
- langchain\[patch]: Export helper functions from indexing api by
[@&#8203;bracesproul](https://togithub.com/bracesproul) in
[https://github.com/langchain-ai/langchainjs/pull/4344](https://togithub.com/langchain-ai/langchainjs/pull/4344)
- docs\[minor]: Add Human-in-the-loop to tools use case by
[@&#8203;bracesproul](https://togithub.com/bracesproul) in
[https://github.com/langchain-ai/langchainjs/pull/4314](https://togithub.com/langchain-ai/langchainjs/pull/4314)
- langchain\[minor],docs\[minor]: Add `SitemapLoader` by
[@&#8203;bracesproul](https://togithub.com/bracesproul) in
[https://github.com/langchain-ai/langchainjs/pull/4331](https://togithub.com/langchain-ai/langchainjs/pull/4331)
- langchain\[patch]: Rm unwanted build artifacts by
[@&#8203;bracesproul](https://togithub.com/bracesproul) in
[https://github.com/langchain-ai/langchainjs/pull/4345](https://togithub.com/langchain-ai/langchainjs/pull/4345)
- langchain\[patch]: Release 0.1.17 by
[@&#8203;bracesproul](https://togithub.com/bracesproul) in
[https://github.com/langchain-ai/langchainjs/pull/4347](https://togithub.com/langchain-ai/langchainjs/pull/4347)
- langchain\[patch],docs\[patch]: Fix double redirect by
[@&#8203;bracesproul](https://togithub.com/bracesproul) in
[https://github.com/langchain-ai/langchainjs/pull/4348](https://togithub.com/langchain-ai/langchainjs/pull/4348)
- core\[patch]: Fix remote runnable streamLog type, update docs by
[@&#8203;jacoblee93](https://togithub.com/jacoblee93) in
[https://github.com/langchain-ai/langchainjs/pull/4353](https://togithub.com/langchain-ai/langchainjs/pull/4353)
- core\[patch]: Release 0.1.26 by
[@&#8203;jacoblee93](https://togithub.com/jacoblee93) in
[https://github.com/langchain-ai/langchainjs/pull/4354](https://togithub.com/langchain-ai/langchainjs/pull/4354)
- docs\[patch]: corrected typo in output parsers documentation by
[@&#8203;kenchandev](https://togithub.com/kenchandev) in
[https://github.com/langchain-ai/langchainjs/pull/4356](https://togithub.com/langchain-ai/langchainjs/pull/4356)
- community\[patch]: Support OpenSearch Serverless by
[@&#8203;huuyafwww](https://togithub.com/huuyafwww) in
[https://github.com/langchain-ai/langchainjs/pull/4229](https://togithub.com/langchain-ai/langchainjs/pull/4229)
- langchain\[patch]: Make sitemap test integration by
[@&#8203;bracesproul](https://togithub.com/bracesproul) in
[https://github.com/langchain-ai/langchainjs/pull/4358](https://togithub.com/langchain-ai/langchainjs/pull/4358)
- community\[minor]: Added `SQLiteRecordManager` by
[@&#8203;jasonnathan](https://togithub.com/jasonnathan) in
[https://github.com/langchain-ai/langchainjs/pull/4321](https://togithub.com/langchain-ai/langchainjs/pull/4321)
- community\[minor]: Add Dria retriever by
[@&#8203;erhant](https://togithub.com/erhant) in
[https://github.com/langchain-ai/langchainjs/pull/4302](https://togithub.com/langchain-ai/langchainjs/pull/4302)
- community\[minor],docs\[minor]: Add `UpstashVector` by
[@&#8203;fahreddinozcan](https://togithub.com/fahreddinozcan) in
[https://github.com/langchain-ai/langchainjs/pull/4288](https://togithub.com/langchain-ai/langchainjs/pull/4288)
- community\[patch]: Release 0.0.27 by
[@&#8203;jacoblee93](https://togithub.com/jacoblee93) in
[https://github.com/langchain-ai/langchainjs/pull/4359](https://togithub.com/langchain-ai/langchainjs/pull/4359)
- core\[minor]: Adds streamEvents method to runnables by
[@&#8203;jacoblee93](https://togithub.com/jacoblee93) in
[https://github.com/langchain-ai/langchainjs/pull/4349](https://togithub.com/langchain-ai/langchainjs/pull/4349)
- docs\[minor]: Add streamEvents docs by
[@&#8203;jacoblee93](https://togithub.com/jacoblee93) in
[https://github.com/langchain-ai/langchainjs/pull/4365](https://togithub.com/langchain-ai/langchainjs/pull/4365)
- Fix doc typo for formatPromptValue in prompts/quick_start.mdx by
[@&#8203;TonyGravagno](https://togithub.com/TonyGravagno) in
[https://github.com/langchain-ai/langchainjs/pull/4378](https://togithub.com/langchain-ai/langchainjs/pull/4378)
- core\[minor]: Adds addMessages method for chat history by
[@&#8203;jacoblee93](https://togithub.com/jacoblee93) in
[https://github.com/langchain-ai/langchainjs/pull/4381](https://togithub.com/langchain-ai/langchainjs/pull/4381)
- langchain\[patch]: Update cypher qa prompt by
[@&#8203;tomasonjo](https://togithub.com/tomasonjo) in
[https://github.com/langchain-ai/langchainjs/pull/4369](https://togithub.com/langchain-ai/langchainjs/pull/4369)
- community\[patch]: allow to modify OpenSerach number of
shards/replicas by [@&#8203;ansnoussi](https://togithub.com/ansnoussi)
in
[https://github.com/langchain-ai/langchainjs/pull/4372](https://togithub.com/langchain-ai/langchainjs/pull/4372)
- community\[patch]: Update `firebase-admin` dependency by
[@&#8203;JakubKontra](https://togithub.com/JakubKontra) in
[https://github.com/langchain-ai/langchainjs/pull/4377](https://togithub.com/langchain-ai/langchainjs/pull/4377)
- docs\[patch],langchain\[patch]: Clean up legacy retrieval QA chain
code in docs, fix bad type by
[@&#8203;jacoblee93](https://togithub.com/jacoblee93) in
[https://github.com/langchain-ai/langchainjs/pull/4384](https://togithub.com/langchain-ai/langchainjs/pull/4384)
- langchain\[patch]: Bump langchainhub dep to latest by
[@&#8203;bracesproul](https://togithub.com/bracesproul) in
[https://github.com/langchain-ai/langchainjs/pull/4382](https://togithub.com/langchain-ai/langchainjs/pull/4382)
- core\[patch]: Relax required arguments on core load method by
[@&#8203;jacoblee93](https://togithub.com/jacoblee93) in
[https://github.com/langchain-ai/langchainjs/pull/4385](https://togithub.com/langchain-ai/langchainjs/pull/4385)
- cohere\[minor]: Add cohere rerank by
[@&#8203;bracesproul](https://togithub.com/bracesproul) in
[https://github.com/langchain-ai/langchainjs/pull/4380](https://togithub.com/langchain-ai/langchainjs/pull/4380)
- cohere\[patch]: Release 0.0.5 by
[@&#8203;bracesproul](https://togithub.com/bracesproul) in
[https://github.com/langchain-ai/langchainjs/pull/4389](https://togithub.com/langchain-ai/langchainjs/pull/4389)
- docs\[minor], core\[patch]: Adds docs for creating custom modules and
extending LangChain by
[@&#8203;jacoblee93](https://togithub.com/jacoblee93) in
[https://github.com/langchain-ai/langchainjs/pull/4397](https://togithub.com/langchain-ai/langchainjs/pull/4397)
- core\[patch]: Release 0.1.28 by
[@&#8203;jacoblee93](https://togithub.com/jacoblee93) in
[https://github.com/langchain-ai/langchainjs/pull/4399](https://togithub.com/langchain-ai/langchainjs/pull/4399)
- experimental\[patch]: Add threadId and runId to
OpenAIAssistantRunnable returnValues for AgentExecutor by
[@&#8203;imjwang](https://togithub.com/imjwang) in
[https://github.com/langchain-ai/langchainjs/pull/4392](https://togithub.com/langchain-ai/langchainjs/pull/4392)
- cloudflare\[patch]: Add metadata filtering support to Cloudflare
Vectorize by [@&#8203;davkorss](https://togithub.com/davkorss) in
[https://github.com/langchain-ai/langchainjs/pull/4387](https://togithub.com/langchain-ai/langchainjs/pull/4387)
- community\[patch]: Fix neo4j vector for multiple indexes by
[@&#8203;tomasonjo](https://togithub.com/tomasonjo) in
[https://github.com/langchain-ai/langchainjs/pull/4390](https://togithub.com/langchain-ai/langchainjs/pull/4390)
- community\[patch]: Bump versions by
[@&#8203;jacoblee93](https://togithub.com/jacoblee93) in
[https://github.com/langchain-ai/langchainjs/pull/4400](https://togithub.com/langchain-ai/langchainjs/pull/4400)
- community\[patch]: Release 0.0.28 by
[@&#8203;jacoblee93](https://togithub.com/jacoblee93) in
[https://github.com/langchain-ai/langchainjs/pull/4401](https://togithub.com/langchain-ai/langchainjs/pull/4401)
- langchain\[patch]: Bump deps by
[@&#8203;jacoblee93](https://togithub.com/jacoblee93) in
[https://github.com/langchain-ai/langchainjs/pull/4402](https://togithub.com/langchain-ai/langchainjs/pull/4402)
- langchain\[patch]: Fix: Prevent text-splitter `createDocments`
metadata being overwritten. by
[@&#8203;iperzic](https://togithub.com/iperzic) in
[https://github.com/langchain-ai/langchainjs/pull/4350](https://togithub.com/langchain-ai/langchainjs/pull/4350)

#### New Contributors

- [@&#8203;eknuth](https://togithub.com/eknuth) made their first
contribution in
[https://github.com/langchain-ai/langchainjs/pull/4335](https://togithub.com/langchain-ai/langchainjs/pull/4335)
- [@&#8203;kenchandev](https://togithub.com/kenchandev) made their first
contribution in
[https://github.com/langchain-ai/langchainjs/pull/4356](https://togithub.com/langchain-ai/langchainjs/pull/4356)
- [@&#8203;huuyafwww](https://togithub.com/huuyafwww) made their first
contribution in
[https://github.com/langchain-ai/langchainjs/pull/4229](https://togithub.com/langchain-ai/langchainjs/pull/4229)
- [@&#8203;erhant](https://togithub.com/erhant) made their first
contribution in
[https://github.com/langchain-ai/langchainjs/pull/4302](https://togithub.com/langchain-ai/langchainjs/pull/4302)
- [@&#8203;fahreddinozcan](https://togithub.com/fahreddinozcan) made
their first contribution in
[https://github.com/langchain-ai/langchainjs/pull/4288](https://togithub.com/langchain-ai/langchainjs/pull/4288)
- [@&#8203;TonyGravagno](https://togithub.com/TonyGravagno) made their
first contribution in
[https://github.com/langchain-ai/langchainjs/pull/4378](https://togithub.com/langchain-ai/langchainjs/pull/4378)
- [@&#8203;ansnoussi](https://togithub.com/ansnoussi) made their first
contribution in
[https://github.com/langchain-ai/langchainjs/pull/4372](https://togithub.com/langchain-ai/langchainjs/pull/4372)
- [@&#8203;JakubKontra](https://togithub.com/JakubKontra) made their
first contribution in
[https://github.com/langchain-ai/langchainjs/pull/4377](https://togithub.com/langchain-ai/langchainjs/pull/4377)
- [@&#8203;davkorss](https://togithub.com/davkorss) made their first
contribution in
[https://github.com/langchain-ai/langchainjs/pull/4387](https://togithub.com/langchain-ai/langchainjs/pull/4387)
- [@&#8203;iperzic](https://togithub.com/iperzic) made their first
contribution in
[https://github.com/langchain-ai/langchainjs/pull/4350](https://togithub.com/langchain-ai/langchainjs/pull/4350)

**Full Changelog**:
https://github.com/langchain-ai/langchainjs/compare/0.1.16...0.1.18

</details>

<details>
<summary>steven-tey/novel (novel)</summary>

### [`v0.2.4`](https://togithub.com/steven-tey/novel/releases/tag/0.2.4)

[Compare
Source](https://togithub.com/steven-tey/novel/compare/0.2.3...0.2.4)

#### What's Changed

- chore: update tiptap markdown by
[@&#8203;andrewdoro](https://togithub.com/andrewdoro) in
[https://github.com/steven-tey/novel/pull/295](https://togithub.com/steven-tey/novel/pull/295)

**Full Changelog**:
https://github.com/steven-tey/novel/compare/0.2.3...0.2.4

### [`v0.2.3`](https://togithub.com/steven-tey/novel/releases/tag/0.2.3)

[Compare
Source](https://togithub.com/steven-tey/novel/compare/8d168f58ca8e6cc9a859f232a570a2ded6532367...0.2.3)

**Full Changelog**:
https://github.com/steven-tey/novel/compare/0.2.1...0.2.3

###
[`v0.2.2`](https://togithub.com/steven-tey/novel/compare/0.2.1...8d168f58ca8e6cc9a859f232a570a2ded6532367)

[Compare
Source](https://togithub.com/steven-tey/novel/compare/0.2.1...8d168f58ca8e6cc9a859f232a570a2ded6532367)

### [`v0.2.1`](https://togithub.com/steven-tey/novel/releases/tag/0.2.1)

[Compare
Source](https://togithub.com/steven-tey/novel/compare/0.2.0...0.2.1)

#### What's Changed

(Minor): Updated Placeholder `without or '++' for AI autocomplete...`
until AI features are available

**Full Changelog**:
https://github.com/steven-tey/novel/compare/v0.1.0...0.2.1

</details>

<details>
<summary>openai/openai-node (openai)</summary>

###
[`v4.28.0`](https://togithub.com/openai/openai-node/blob/HEAD/CHANGELOG.md#4280-2024-02-13)

[Compare
Source](https://togithub.com/openai/openai-node/compare/v4.27.1...v4.28.0)

Full Changelog:
[v4.27.1...v4.28.0](https://togithub.com/openai/openai-node/compare/v4.27.1...v4.28.0)

##### Features

- **api:** updates
([#&#8203;669](https://togithub.com/openai/openai-node/issues/669))
([e1900f9](https://togithub.com/openai/openai-node/commit/e1900f97ee3f4758d47a7eb4659e30abe3750c99))

</details>

<details>
<summary>pytest-dev/pytest (pytest)</summary>

###
[`v8.0.1`](https://togithub.com/pytest-dev/pytest/releases/tag/8.0.1)

[Compare
Source](https://togithub.com/pytest-dev/pytest/compare/8.0.0...8.0.1)

# pytest 8.0.1 (2024-02-16)

## Bug Fixes

- [#&#8203;11875](https://togithub.com/pytest-dev/pytest/issues/11875):
Correctly handle errors from `getpass.getuser`{.interpreted-text
role="func"} in Python 3.13.
- [#&#8203;11879](https://togithub.com/pytest-dev/pytest/issues/11879):
Fix an edge case where `ExceptionInfo._stringify_exception` could crash
`pytest.raises`{.interpreted-text role="func"}.
- [#&#8203;11906](https://togithub.com/pytest-dev/pytest/issues/11906):
Fix regression with `pytest.warns`{.interpreted-text role="func"} using
custom warning subclasses which have more than one parameter in their
\[\__init\_\_]{.title-ref}.
- [#&#8203;11907](https://togithub.com/pytest-dev/pytest/issues/11907):
Fix a regression in pytest 8.0.0 whereby calling
`pytest.skip`{.interpreted-text role="func"} and similar control-flow
exceptions within a `pytest.warns()`{.interpreted-text role="func"}
block would get suppressed instead of propagating.
- [#&#8203;11929](https://togithub.com/pytest-dev/pytest/issues/11929):
Fix a regression in pytest 8.0.0 whereby autouse fixtures defined in a
module get ignored by the doctests in the module.
- [#&#8203;11937](https://togithub.com/pytest-dev/pytest/issues/11937):
Fix a regression in pytest 8.0.0 whereby items would be collected in
reverse order in some circumstances.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on Monday" in timezone
America/Chicago, Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://togithub.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/autoblocksai/autoblocks-examples).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xOTEuMCIsInVwZGF0ZWRJblZlciI6IjM3LjE5MS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
haydeniw pushed a commit to haydeniw/langchain that referenced this pull request Feb 27, 2024
…documents=11.4.0 (langchain-ai#15659)

- **Description:** Updates
`libs/community/langchain_community/vectorstores/azuresearch.py` to
support the stable version `azure-search-documents=11.4.0`
- **Issue:** langchain-ai#14534,
langchain-ai#15039,
langchain-ai#15355
  - **Dependencies:** azure-search-documents>=11.4.0

---------

Co-authored-by: Clément Tamines <Skar0@users.noreply.github.com>
Co-authored-by: Bagatur <baskaryan@gmail.com>
baskaryan pushed a commit that referenced this pull request Mar 26, 2024
…#18938)

- **Description:** The `semantic_hybrid_search_with_score_and_rerank`
method of `AzureSearch` contains a hardcoded field name "metadata" for
the document metadata in the Azure AI Search Index. Adding such a field
is optional when creating an Azure AI Search Index, as other snippets
from `AzureSearch` test for the existence of this field before trying to
access it. Furthermore, the metadata field name shouldn't be hardcoded
as "metadata" and use the `FIELDS_METADATA` variable that defines this
field name instead. In the current implementation, any index without a
metadata field named "metadata" will yield an error if a semantic answer
is returned by the search in
`semantic_hybrid_search_with_score_and_rerank`.

- **Issue:** #18731

- **Prior fix to this bug:** This bug was fixed in this PR
#15642 by adding a check
for the existence of the metadata field named `FIELDS_METADATA` and
retrieving a value for the key called "key" in that metadata if it
exists. If the field named `FIELDS_METADATA` was not present, an empty
string was returned. This fix was removed in this PR
#15659 (see
ed1ffca).
@lz-chen: could you confirm this wasn't intentional? 

- **New fix to this bug:** I believe there was an oversight in the logic
of the fix from
[#1564](#15642) which I
explain below.
The `semantic_hybrid_search_with_score_and_rerank` method creates a
dictionary `semantic_answers_dict` with semantic answers returned by the
search as follows.

https://github.com/langchain-ai/langchain/blob/5c2f7e6b2b474248af63a5f0f726b1414c5467c8/libs/community/langchain_community/vectorstores/azuresearch.py#L574-L581
The keys in this dictionary are the unique document ids in the index, if
I understand the [documentation of semantic
answers](https://learn.microsoft.com/en-us/azure/search/semantic-answers)
in Azure AI Search correctly. When the method transforms a search result
into a `Document` object, an "answer" key is added to the document's
metadata. The value for this "answer" key should be the semantic answer
returned by the search from this document, if such an answer is
returned. The match between a `Document` object and the semantic answers
returned by the search should be done through the unique document id,
which is used as a key for the `semantic_answers_dict` dictionary. This
id is defined in the search result's field named `FIELDS_ID`. I added a
check to avoid any error in case no field named `FIELDS_ID` exists in a
search result (which shouldn't happen in theory).
A benefit of this approach is that this fix should work whether or not
the Azure AI Search Index contains a metadata field.

@levalencia could you confirm my analysis and test the fix?
@raunakshrivastava7 do you agree with the fix?

Thanks for the help!
rahul-trip pushed a commit to daxa-ai/langchain that referenced this pull request Mar 27, 2024
…langchain-ai#18938)

- **Description:** The `semantic_hybrid_search_with_score_and_rerank`
method of `AzureSearch` contains a hardcoded field name "metadata" for
the document metadata in the Azure AI Search Index. Adding such a field
is optional when creating an Azure AI Search Index, as other snippets
from `AzureSearch` test for the existence of this field before trying to
access it. Furthermore, the metadata field name shouldn't be hardcoded
as "metadata" and use the `FIELDS_METADATA` variable that defines this
field name instead. In the current implementation, any index without a
metadata field named "metadata" will yield an error if a semantic answer
is returned by the search in
`semantic_hybrid_search_with_score_and_rerank`.

- **Issue:** langchain-ai#18731

- **Prior fix to this bug:** This bug was fixed in this PR
langchain-ai#15642 by adding a check
for the existence of the metadata field named `FIELDS_METADATA` and
retrieving a value for the key called "key" in that metadata if it
exists. If the field named `FIELDS_METADATA` was not present, an empty
string was returned. This fix was removed in this PR
langchain-ai#15659 (see
langchain-ai@ed1ffca).
@lz-chen: could you confirm this wasn't intentional? 

- **New fix to this bug:** I believe there was an oversight in the logic
of the fix from
[langchain-ai#1564](langchain-ai#15642) which I
explain below.
The `semantic_hybrid_search_with_score_and_rerank` method creates a
dictionary `semantic_answers_dict` with semantic answers returned by the
search as follows.

https://github.com/langchain-ai/langchain/blob/5c2f7e6b2b474248af63a5f0f726b1414c5467c8/libs/community/langchain_community/vectorstores/azuresearch.py#L574-L581
The keys in this dictionary are the unique document ids in the index, if
I understand the [documentation of semantic
answers](https://learn.microsoft.com/en-us/azure/search/semantic-answers)
in Azure AI Search correctly. When the method transforms a search result
into a `Document` object, an "answer" key is added to the document's
metadata. The value for this "answer" key should be the semantic answer
returned by the search from this document, if such an answer is
returned. The match between a `Document` object and the semantic answers
returned by the search should be done through the unique document id,
which is used as a key for the `semantic_answers_dict` dictionary. This
id is defined in the search result's field named `FIELDS_ID`. I added a
check to avoid any error in case no field named `FIELDS_ID` exists in a
search result (which shouldn't happen in theory).
A benefit of this approach is that this fix should work whether or not
the Azure AI Search Index contains a metadata field.

@levalencia could you confirm my analysis and test the fix?
@raunakshrivastava7 do you agree with the fix?

Thanks for the help!
bechbd pushed a commit to bechbd/langchain that referenced this pull request Mar 29, 2024
…langchain-ai#18938)

- **Description:** The `semantic_hybrid_search_with_score_and_rerank`
method of `AzureSearch` contains a hardcoded field name "metadata" for
the document metadata in the Azure AI Search Index. Adding such a field
is optional when creating an Azure AI Search Index, as other snippets
from `AzureSearch` test for the existence of this field before trying to
access it. Furthermore, the metadata field name shouldn't be hardcoded
as "metadata" and use the `FIELDS_METADATA` variable that defines this
field name instead. In the current implementation, any index without a
metadata field named "metadata" will yield an error if a semantic answer
is returned by the search in
`semantic_hybrid_search_with_score_and_rerank`.

- **Issue:** langchain-ai#18731

- **Prior fix to this bug:** This bug was fixed in this PR
langchain-ai#15642 by adding a check
for the existence of the metadata field named `FIELDS_METADATA` and
retrieving a value for the key called "key" in that metadata if it
exists. If the field named `FIELDS_METADATA` was not present, an empty
string was returned. This fix was removed in this PR
langchain-ai#15659 (see
langchain-ai@ed1ffca).
@lz-chen: could you confirm this wasn't intentional? 

- **New fix to this bug:** I believe there was an oversight in the logic
of the fix from
[langchain-ai#1564](langchain-ai#15642) which I
explain below.
The `semantic_hybrid_search_with_score_and_rerank` method creates a
dictionary `semantic_answers_dict` with semantic answers returned by the
search as follows.

https://github.com/langchain-ai/langchain/blob/5c2f7e6b2b474248af63a5f0f726b1414c5467c8/libs/community/langchain_community/vectorstores/azuresearch.py#L574-L581
The keys in this dictionary are the unique document ids in the index, if
I understand the [documentation of semantic
answers](https://learn.microsoft.com/en-us/azure/search/semantic-answers)
in Azure AI Search correctly. When the method transforms a search result
into a `Document` object, an "answer" key is added to the document's
metadata. The value for this "answer" key should be the semantic answer
returned by the search from this document, if such an answer is
returned. The match between a `Document` object and the semantic answers
returned by the search should be done through the unique document id,
which is used as a key for the `semantic_answers_dict` dictionary. This
id is defined in the search result's field named `FIELDS_ID`. I added a
check to avoid any error in case no field named `FIELDS_ID` exists in a
search result (which shouldn't happen in theory).
A benefit of this approach is that this fix should work whether or not
the Azure AI Search Index contains a metadata field.

@levalencia could you confirm my analysis and test the fix?
@raunakshrivastava7 do you agree with the fix?

Thanks for the help!
gkorland pushed a commit to FalkorDB/langchain that referenced this pull request Mar 30, 2024
…langchain-ai#18938)

- **Description:** The `semantic_hybrid_search_with_score_and_rerank`
method of `AzureSearch` contains a hardcoded field name "metadata" for
the document metadata in the Azure AI Search Index. Adding such a field
is optional when creating an Azure AI Search Index, as other snippets
from `AzureSearch` test for the existence of this field before trying to
access it. Furthermore, the metadata field name shouldn't be hardcoded
as "metadata" and use the `FIELDS_METADATA` variable that defines this
field name instead. In the current implementation, any index without a
metadata field named "metadata" will yield an error if a semantic answer
is returned by the search in
`semantic_hybrid_search_with_score_and_rerank`.

- **Issue:** langchain-ai#18731

- **Prior fix to this bug:** This bug was fixed in this PR
langchain-ai#15642 by adding a check
for the existence of the metadata field named `FIELDS_METADATA` and
retrieving a value for the key called "key" in that metadata if it
exists. If the field named `FIELDS_METADATA` was not present, an empty
string was returned. This fix was removed in this PR
langchain-ai#15659 (see
langchain-ai@ed1ffca).
@lz-chen: could you confirm this wasn't intentional? 

- **New fix to this bug:** I believe there was an oversight in the logic
of the fix from
[langchain-ai#1564](langchain-ai#15642) which I
explain below.
The `semantic_hybrid_search_with_score_and_rerank` method creates a
dictionary `semantic_answers_dict` with semantic answers returned by the
search as follows.

https://github.com/langchain-ai/langchain/blob/5c2f7e6b2b474248af63a5f0f726b1414c5467c8/libs/community/langchain_community/vectorstores/azuresearch.py#L574-L581
The keys in this dictionary are the unique document ids in the index, if
I understand the [documentation of semantic
answers](https://learn.microsoft.com/en-us/azure/search/semantic-answers)
in Azure AI Search correctly. When the method transforms a search result
into a `Document` object, an "answer" key is added to the document's
metadata. The value for this "answer" key should be the semantic answer
returned by the search from this document, if such an answer is
returned. The match between a `Document` object and the semantic answers
returned by the search should be done through the unique document id,
which is used as a key for the `semantic_answers_dict` dictionary. This
id is defined in the search result's field named `FIELDS_ID`. I added a
check to avoid any error in case no field named `FIELDS_ID` exists in a
search result (which shouldn't happen in theory).
A benefit of this approach is that this fix should work whether or not
the Azure AI Search Index contains a metadata field.

@levalencia could you confirm my analysis and test the fix?
@raunakshrivastava7 do you agree with the fix?

Thanks for the help!
chrispy-snps pushed a commit to chrispy-snps/langchain that referenced this pull request Mar 30, 2024
…langchain-ai#18938)

- **Description:** The `semantic_hybrid_search_with_score_and_rerank`
method of `AzureSearch` contains a hardcoded field name "metadata" for
the document metadata in the Azure AI Search Index. Adding such a field
is optional when creating an Azure AI Search Index, as other snippets
from `AzureSearch` test for the existence of this field before trying to
access it. Furthermore, the metadata field name shouldn't be hardcoded
as "metadata" and use the `FIELDS_METADATA` variable that defines this
field name instead. In the current implementation, any index without a
metadata field named "metadata" will yield an error if a semantic answer
is returned by the search in
`semantic_hybrid_search_with_score_and_rerank`.

- **Issue:** langchain-ai#18731

- **Prior fix to this bug:** This bug was fixed in this PR
langchain-ai#15642 by adding a check
for the existence of the metadata field named `FIELDS_METADATA` and
retrieving a value for the key called "key" in that metadata if it
exists. If the field named `FIELDS_METADATA` was not present, an empty
string was returned. This fix was removed in this PR
langchain-ai#15659 (see
langchain-ai@ed1ffca).
@lz-chen: could you confirm this wasn't intentional? 

- **New fix to this bug:** I believe there was an oversight in the logic
of the fix from
[langchain-ai#1564](langchain-ai#15642) which I
explain below.
The `semantic_hybrid_search_with_score_and_rerank` method creates a
dictionary `semantic_answers_dict` with semantic answers returned by the
search as follows.

https://github.com/langchain-ai/langchain/blob/5c2f7e6b2b474248af63a5f0f726b1414c5467c8/libs/community/langchain_community/vectorstores/azuresearch.py#L574-L581
The keys in this dictionary are the unique document ids in the index, if
I understand the [documentation of semantic
answers](https://learn.microsoft.com/en-us/azure/search/semantic-answers)
in Azure AI Search correctly. When the method transforms a search result
into a `Document` object, an "answer" key is added to the document's
metadata. The value for this "answer" key should be the semantic answer
returned by the search from this document, if such an answer is
returned. The match between a `Document` object and the semantic answers
returned by the search should be done through the unique document id,
which is used as a key for the `semantic_answers_dict` dictionary. This
id is defined in the search result's field named `FIELDS_ID`. I added a
check to avoid any error in case no field named `FIELDS_ID` exists in a
search result (which shouldn't happen in theory).
A benefit of this approach is that this fix should work whether or not
the Azure AI Search Index contains a metadata field.

@levalencia could you confirm my analysis and test the fix?
@raunakshrivastava7 do you agree with the fix?

Thanks for the help!
chrispy-snps pushed a commit to chrispy-snps/langchain that referenced this pull request Mar 30, 2024
…langchain-ai#18938)

- **Description:** The `semantic_hybrid_search_with_score_and_rerank`
method of `AzureSearch` contains a hardcoded field name "metadata" for
the document metadata in the Azure AI Search Index. Adding such a field
is optional when creating an Azure AI Search Index, as other snippets
from `AzureSearch` test for the existence of this field before trying to
access it. Furthermore, the metadata field name shouldn't be hardcoded
as "metadata" and use the `FIELDS_METADATA` variable that defines this
field name instead. In the current implementation, any index without a
metadata field named "metadata" will yield an error if a semantic answer
is returned by the search in
`semantic_hybrid_search_with_score_and_rerank`.

- **Issue:** langchain-ai#18731

- **Prior fix to this bug:** This bug was fixed in this PR
langchain-ai#15642 by adding a check
for the existence of the metadata field named `FIELDS_METADATA` and
retrieving a value for the key called "key" in that metadata if it
exists. If the field named `FIELDS_METADATA` was not present, an empty
string was returned. This fix was removed in this PR
langchain-ai#15659 (see
langchain-ai@ed1ffca).
@lz-chen: could you confirm this wasn't intentional? 

- **New fix to this bug:** I believe there was an oversight in the logic
of the fix from
[langchain-ai#1564](langchain-ai#15642) which I
explain below.
The `semantic_hybrid_search_with_score_and_rerank` method creates a
dictionary `semantic_answers_dict` with semantic answers returned by the
search as follows.

https://github.com/langchain-ai/langchain/blob/5c2f7e6b2b474248af63a5f0f726b1414c5467c8/libs/community/langchain_community/vectorstores/azuresearch.py#L574-L581
The keys in this dictionary are the unique document ids in the index, if
I understand the [documentation of semantic
answers](https://learn.microsoft.com/en-us/azure/search/semantic-answers)
in Azure AI Search correctly. When the method transforms a search result
into a `Document` object, an "answer" key is added to the document's
metadata. The value for this "answer" key should be the semantic answer
returned by the search from this document, if such an answer is
returned. The match between a `Document` object and the semantic answers
returned by the search should be done through the unique document id,
which is used as a key for the `semantic_answers_dict` dictionary. This
id is defined in the search result's field named `FIELDS_ID`. I added a
check to avoid any error in case no field named `FIELDS_ID` exists in a
search result (which shouldn't happen in theory).
A benefit of this approach is that this fix should work whether or not
the Azure AI Search Index contains a metadata field.

@levalencia could you confirm my analysis and test the fix?
@raunakshrivastava7 do you agree with the fix?

Thanks for the help!
hinthornw pushed a commit that referenced this pull request Apr 26, 2024
…#18938)

- **Description:** The `semantic_hybrid_search_with_score_and_rerank`
method of `AzureSearch` contains a hardcoded field name "metadata" for
the document metadata in the Azure AI Search Index. Adding such a field
is optional when creating an Azure AI Search Index, as other snippets
from `AzureSearch` test for the existence of this field before trying to
access it. Furthermore, the metadata field name shouldn't be hardcoded
as "metadata" and use the `FIELDS_METADATA` variable that defines this
field name instead. In the current implementation, any index without a
metadata field named "metadata" will yield an error if a semantic answer
is returned by the search in
`semantic_hybrid_search_with_score_and_rerank`.

- **Issue:** #18731

- **Prior fix to this bug:** This bug was fixed in this PR
#15642 by adding a check
for the existence of the metadata field named `FIELDS_METADATA` and
retrieving a value for the key called "key" in that metadata if it
exists. If the field named `FIELDS_METADATA` was not present, an empty
string was returned. This fix was removed in this PR
#15659 (see
ed1ffca).
@lz-chen: could you confirm this wasn't intentional? 

- **New fix to this bug:** I believe there was an oversight in the logic
of the fix from
[#1564](#15642) which I
explain below.
The `semantic_hybrid_search_with_score_and_rerank` method creates a
dictionary `semantic_answers_dict` with semantic answers returned by the
search as follows.

https://github.com/langchain-ai/langchain/blob/5c2f7e6b2b474248af63a5f0f726b1414c5467c8/libs/community/langchain_community/vectorstores/azuresearch.py#L574-L581
The keys in this dictionary are the unique document ids in the index, if
I understand the [documentation of semantic
answers](https://learn.microsoft.com/en-us/azure/search/semantic-answers)
in Azure AI Search correctly. When the method transforms a search result
into a `Document` object, an "answer" key is added to the document's
metadata. The value for this "answer" key should be the semantic answer
returned by the search from this document, if such an answer is
returned. The match between a `Document` object and the semantic answers
returned by the search should be done through the unique document id,
which is used as a key for the `semantic_answers_dict` dictionary. This
id is defined in the search result's field named `FIELDS_ID`. I added a
check to avoid any error in case no field named `FIELDS_ID` exists in a
search result (which shouldn't happen in theory).
A benefit of this approach is that this fix should work whether or not
the Azure AI Search Index contains a metadata field.

@levalencia could you confirm my analysis and test the fix?
@raunakshrivastava7 do you agree with the fix?

Thanks for the help!
eduardogch pushed a commit to devopsdale/chat-with-your-data-solution-accelerator that referenced this pull request Apr 30, 2024
* Bump to latest versions

* Downgrade azure-search-documents latest version is not compatible with
langchaig
- Discussion: langchain-ai/langchain#13245
- PR to fix: langchain-ai/langchain#15659

* Migrate to new content safety api

- Old: https://github.com/Azure-Samples/AzureAIContentSafety/blob/main/python/1.0.0b1/sample_analyze_text.py#L37
- New: https://github.com/Azure-Samples/AzureAIContentSafety/blob/main/python/1.0.0/sample_analyze_text.py#L39

* Downgrade openai

The changes are too vast to be included in this PR

* Bump dependencies

* Fix test and bump langchain to latest version
Comment on lines -473 to -477
**(
{FIELDS_ID: result.pop(FIELDS_ID)}
if FIELDS_ID in result
else {}
),
Copy link
Collaborator

@baskaryan baskaryan Jun 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey @lz-chen @mattgotteiner, was there a specific reason we removed FIELDS_ID in this pr?

opening issue to track regression: #22827

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖:improvement Medium size change to existing code to handle new use-cases lgtm PR looks good. Use to confirm that a PR is ready for merging. partner size:L This PR changes 100-499 lines, ignoring generated files. template Ɑ: vector store Related to vector store module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants