Commit Graph

6875 Commits (efe6cfafe22a8bb3f084d9f12509748f67d47e58)
 

Author SHA1 Message Date
Varik Matevosyan efe6cfafe2
community: Added Lantern as VectorStore (#12951)
Support [Lantern](https://github.com/lanterndata/lantern) as a new
VectorStore type.

- Added Lantern as VectorStore.
It will support 3 distance functions `l2 squared`, `cosine` and
`hamming` and will use `HNSW` index.
- Added tests
- Added example notebook
8 months ago
Harrison Chase 1afac77439
stop making copies of inputs (#15926) 8 months ago
Edwin Wenink 9fb09c1c30
community: fix the "page" mode in the AzureAIDocumentIntelligenceParser (bug) (#15958)
**Description**: the "page" mode in the
AzureAIDocumentIntelligenceParser is not accessible due to a wrong
membership test. The mode argument can only be a string (also see the
assertion in the `__init__`: `assert self.mode in ["single", "page",
"object", "markdown"]`, so the check `elif self.mode == ["page"]:`
always fails.
As a result, effectively the "object" mode is used when selecting the
"page" mode, which may lead to errors.

The docstring of the `AzureAIDocumentIntelligenceLoader` also ommitted
the `mode` parameter alltogether, so I added it.

**Issue**: I could not find a related issue (this class is only 3 weeks
old anyways)

**Dependencies**: this PR does not introduce or affect dependencies.

The current demo notebook and examples are not affected because they all
use the default markdown mode.
8 months ago
Mahdi Setayesh eb76f9c9fe
community: Fixing a performance issue with AzureSearch to perform batch embedding (#15594)
- **Description:** Azure Cognitive Search vector DB store performs slow
embedding as it does not utilize the batch embedding functionality. This
PR provide a fix to improve the performance of Azure Search class when
adding documents to the vector search,
  - **Issue:** #11313 ,
  - **Dependencies:** any dependencies required for this change,
- **Twitter handle:** we announce bigger features on Twitter. If your PR
gets announced, and you'd like a mention, we'll gladly shout you out!

Please make sure your PR is passing linting and testing before
submitting. Run `make format`, `make lint` and `make test` from the root
of the package you've modified to check this locally.

See contribution guidelines for more information on how to write/run
tests, lint, etc: https://python.langchain.com/docs/contributing/

If you're adding a new integration, please include:
1. a test for the integration, preferably unit tests that do not rely on
network access,
2. an example notebook showing its use. It lives in
`docs/docs/integrations` directory.

If no one reviews your PR within a few days, please @-mention one of
@baskaryan, @eyurtsev, @hwchase17.
 -->
8 months ago
Christophe Bornet bc60203d0f
Add documentation for AstraDBStore (#15953)
Preview:
https://langchain-git-fork-cbornet-astradb-store-doc-langchain.vercel.app/docs/integrations/stores/astradb
8 months ago
Bagatur c697c89ca4
docs: add agent prompt creation examples (#15957) 8 months ago
Erick Friis 69533c8628
multiple[patch]: .post releases and pyproject metadata (#15962) 8 months ago
Rihards Gravis 6a48ea43ec
docs: Update Robocorp Action Server installation instructions (#15943)
**Description:**

Remove section on how to install Action Server and direct the users t o
the instructions on Robocorp repository.

**Reason:**

Robocorp Action Server has moved from a pip installation to a standalone
cli application and is due for changes. Because of that, leaving only
LangChain integration relevant part in the documentation.
8 months ago
Erick Friis 6a2889a4ec
infra: retry release if not found on test pypi (#15913)
<!-- Thank you for contributing to LangChain!

Please title your PR "<package>: <description>", where <package> is
whichever of langchain, community, core, experimental, etc. is being
modified.

Replace this entire comment with:
  - **Description:** a description of the change, 
  - **Issue:** the issue # it fixes if applicable,
  - **Dependencies:** any dependencies required for this change,
- **Twitter handle:** we announce bigger features on Twitter. If your PR
gets announced, and you'd like a mention, we'll gladly shout you out!

Please make sure your PR is passing linting and testing before
submitting. Run `make format`, `make lint` and `make test` from the root
of the package you've modified to check this locally.

See contribution guidelines for more information on how to write/run
tests, lint, etc: https://python.langchain.com/docs/contributing/

If you're adding a new integration, please include:
1. a test for the integration, preferably unit tests that do not rely on
network access,
2. an example notebook showing its use. It lives in
`docs/docs/integrations` directory.

If no one reviews your PR within a few days, please @-mention one of
@baskaryan, @eyurtsev, @hwchase17.
 -->
8 months ago
Erick Friis 95020637bc
openai[patch]: 0.0.2.post1, urls (#15961) 8 months ago
ChengZi d5808f786c
community: Support milvus partition key. (#15740)
- **Description:** Milvus's partition key is an important feature. It
can support multi-tenancy. We hope to introduce this feature.
https://milvus.io/docs/partition_key.md
  - **Issue:** No
  - **Dependencies:** No
  - **Twitter handle:** No

---------

Signed-off-by: ChengZi <chen.zhang@zilliz.com>
Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
8 months ago
enfeng 13b90232c1
langchain-google-genai[patch]: Add support for end_point and transport parameters to the Gemini API (#15532)
Add support for end_point and transport parameters to the Gemini API

---------

Co-authored-by: yangenfeng <yangenfeng@xiaoniangao.com>
Co-authored-by: Erick Friis <erick@langchain.dev>
8 months ago
ohbeep 9b3962fc25
community: Add support of "http" URI for Milvus (#12710) (#15683)
- **Description:** Add support of HTTP URI for Milvus
  - **Issue:** #12710 
  - **Dependencies:** N/A,
8 months ago
Raunak e26e1f8b37
community: Added functions to make async calls to HuggingFaceHub's embedding endpoint in HuggingFaceHubEmbeddings class (#15737)
**Description:**
Added aembed_documents() and aembed_query() async functions in
HuggingFaceHubEmbeddings class in
langchain_community\embeddings\huggingface_hub.py file. It will support
to make async calls to HuggingFaceHub's
embedding endpoint and generate embeddings asynchronously.

Test Cases: Added test_huggingfacehub_embedding_async_documents() and
test_huggingfacehub_embedding_async_query()
functions in test_huggingface_hub.py file to test the two async
functions created in HuggingFaceHubEmbeddings class.

Documentation: Updated huggingfacehub.ipynb with steps to install
huggingface_hub package and use
HuggingFaceHubEmbeddings.

**Dependencies:** None,
**Twitter handle:** I do not have a Twitter account

---------

Co-authored-by: H161961 <Raunak.Raunak@Honeywell.com>
8 months ago
Tal eb9b334a6b
Enable customizing the output parser of `OpenAIFunctionsAgent` (#15827)
- **Description:** This PR defines the output parser of
OpenAIFunctionsAgent as an attribute, enabling customization and
subclassing of the parser logic.
- **Issue:** Subclassing is currently impossible as the
`OpenAIFunctionsAgentOutputParser` class is hard coded into the `plan`
and `aplan` methods
  - **Dependencies:** None

<!-- Thank you for contributing to LangChain!

Please title your PR "<package>: <description>", where <package> is
whichever of langchain, community, core, experimental, etc. is being
modified.

Replace this entire comment with:
  - **Description:** a description of the change, 
  - **Issue:** the issue # it fixes if applicable,
  - **Dependencies:** any dependencies required for this change,
- **Twitter handle:** we announce bigger features on Twitter. If your PR
gets announced, and you'd like a mention, we'll gladly shout you out!

Please make sure your PR is passing linting and testing before
submitting. Run `make format`, `make lint` and `make test` from the root
of the package you've modified to check this locally.

See contribution guidelines for more information on how to write/run
tests, lint, etc: https://python.langchain.com/docs/contributing/

If you're adding a new integration, please include:
1. a test for the integration, preferably unit tests that do not rely on
network access,
2. an example notebook showing its use. It lives in
`docs/docs/integrations` directory.

If no one reviews your PR within a few days, please @-mention one of
@baskaryan, @eyurtsev, @hwchase17.
 -->

---------

Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
8 months ago
Mu Xian Ming 560bb49c99
docs: redis_chat_message_history.ipynb integration doc (#15789)
- **Description:** Updated the docs for the memory integration module
redis_chat_message_history.ipynb
  - **Issue:** #15664
  - **Dependencies:** N/A

Co-authored-by: Mu Xianming <mu.xianming@lmwn.com>
8 months ago
Christophe Bornet 81d1ba05dc
Add a BaseStore backed by AstraDB (#15812)
- **Description:** this change adds a `BaseStore` backed by AstraDB
  - **Twitter handle:** cbornet_
8 months ago
manishsahni2000 74d9fc2f9e
PR community:Removing knn beta content in mongodb atlas vectorstore (#15865)
<!-- Thank you for contributing to LangChain!

Please title your PR "<package>: <description>", where <package> is
whichever of langchain, community, core, experimental, etc. is being
modified.

Replace this entire comment with:
  - **Description:** a description of the change, 
  - **Issue:** the issue # it fixes if applicable,
  - **Dependencies:** any dependencies required for this change,
- **Twitter handle:** we announce bigger features on Twitter. If your PR
gets announced, and you'd like a mention, we'll gladly shout you out!

Please make sure your PR is passing linting and testing before
submitting. Run `make format`, `make lint` and `make test` from the root
of the package you've modified to check this locally.

See contribution guidelines for more information on how to write/run
tests, lint, etc: https://python.langchain.com/docs/contributing/

If you're adding a new integration, please include:
1. a test for the integration, preferably unit tests that do not rely on
network access,
2. an example notebook showing its use. It lives in
`docs/docs/integrations` directory.

If no one reviews your PR within a few days, please @-mention one of
@baskaryan, @eyurtsev, @hwchase17.
 -->
8 months ago
shahrin014 bdd90ae2ee
community: Ollama - Pass headers to post request (#15881)
## Feature
- Set additional headers in constructor
- Headers will be sent in post request

This feature is useful if deploying Ollama on a cloud service such as
hugging face, which requires authentication tokens to be passed in the
request header.

## Tests
- Test if header is passed
- Test if header is not passed
8 months ago
Xin Liu 5efec068c9
feat: Implement `stream` interface (#15875)
<!-- Thank you for contributing to LangChain!

Please title your PR "<package>: <description>", where <package> is
whichever of langchain, community, core, experimental, etc. is being
modified.

Replace this entire comment with:
  - **Description:** a description of the change, 
  - **Issue:** the issue # it fixes if applicable,
  - **Dependencies:** any dependencies required for this change,
- **Twitter handle:** we announce bigger features on Twitter. If your PR
gets announced, and you'd like a mention, we'll gladly shout you out!

Please make sure your PR is passing linting and testing before
submitting. Run `make format`, `make lint` and `make test` from the root
of the package you've modified to check this locally.

See contribution guidelines for more information on how to write/run
tests, lint, etc: https://python.langchain.com/docs/contributing/

If you're adding a new integration, please include:
1. a test for the integration, preferably unit tests that do not rely on
network access,
2. an example notebook showing its use. It lives in
`docs/docs/integrations` directory.

If no one reviews your PR within a few days, please @-mention one of
@baskaryan, @eyurtsev, @hwchase17.
 -->

Major changes:

- Rename `wasm_chat.py` to `llama_edge.py`
- Rename the `WasmChatService` class to `ChatService`
- Implement the `stream` interface for `ChatService`
- Add `test_chat_wasm_service_streaming` in the integration test
- Update `llama_edge.ipynb`

---------

Signed-off-by: Xin Liu <sam@secondstate.io>
8 months ago
Massimiliano Pronesti ec4dab0449
feat(community): make Amadeus toolkit LLM-agnostic (#15879)
- **Description:** `AmadeusToolkit` and `AmadeusClosestAirport`
contained a hardcoded call to `ChatOpenAI`. This PR makes it
LLM-independent, while guaranteeing backward compatibility.
  - **Issue:** #15847 
  - **Dependencies:** None
   
@baskaryan 

<!-- Thank you for contributing to LangChain!

Please title your PR "<package>: <description>", where <package> is
whichever of langchain, community, core, experimental, etc. is being
modified.

Replace this entire comment with:
  - **Description:** a description of the change, 
  - **Issue:** the issue # it fixes if applicable,
  - **Dependencies:** any dependencies required for this change,
- **Twitter handle:** we announce bigger features on Twitter. If your PR
gets announced, and you'd like a mention, we'll gladly shout you out!

Please make sure your PR is passing linting and testing before
submitting. Run `make format`, `make lint` and `make test` from the root
of the package you've modified to check this locally.

See contribution guidelines for more information on how to write/run
tests, lint, etc: https://python.langchain.com/docs/contributing/

If you're adding a new integration, please include:
1. a test for the integration, preferably unit tests that do not rely on
network access,
2. an example notebook showing its use. It lives in
`docs/docs/integrations` directory.

If no one reviews your PR within a few days, please @-mention one of
@baskaryan, @eyurtsev, @hwchase17.
 -->
8 months ago
JanHorcicka f454e95461
langchain: fix OutputParserException (#15914) (#15916)
**Description:**

Fixes OutputParserException thrown by the output_parser when 'query' is
'Null'.

Replace this entire comment with:
- **Description:** Current implentation of output_parser throws
OutputParserException if the response from the LLM contains `query:
null`. This unfortunately happens for my use case. And since there is no
way to modify the prompt used in SelfQueryRetriever, then we have to fix
it here, so it doesn't crash.
  - **Issue:** https://github.com/langchain-ai/langchain/issues/15914

Didn't run tests. `make test` is not working. There is no `test` rule in
the `Makefile`.

Co-authored-by: Jan Horcicka <jhorcick@amazon.com>
8 months ago
Yacine 782dd44be9
<langchain_community.vectorstores>:<Fix pinecone.py __init__ docsrting instruction> (#15922)
- **Description:** The pinecone docstring instructs to pass the
embedding query text causing the warning below. It should be the
embeddings object.
warning message: UserWarning: Passing in `embedding` as a Callable is
deprecated. Please pass in an Embeddings object instead.
  - **Issue:** NA
  - **Dependencies:** None


@baskaryan
8 months ago
Nuno Campos 112208baa5
Passthrough configurable primitive values as tracer metadata (#15915)
<!-- Thank you for contributing to LangChain!

Please title your PR "<package>: <description>", where <package> is
whichever of langchain, community, core, experimental, etc. is being
modified.

Replace this entire comment with:
  - **Description:** a description of the change, 
  - **Issue:** the issue # it fixes if applicable,
  - **Dependencies:** any dependencies required for this change,
- **Twitter handle:** we announce bigger features on Twitter. If your PR
gets announced, and you'd like a mention, we'll gladly shout you out!

Please make sure your PR is passing linting and testing before
submitting. Run `make format`, `make lint` and `make test` from the root
of the package you've modified to check this locally.

See contribution guidelines for more information on how to write/run
tests, lint, etc: https://python.langchain.com/docs/contributing/

If you're adding a new integration, please include:
1. a test for the integration, preferably unit tests that do not rely on
network access,
2. an example notebook showing its use. It lives in
`docs/docs/integrations` directory.

If no one reviews your PR within a few days, please @-mention one of
@baskaryan, @eyurtsev, @hwchase17.
 -->
8 months ago
William FH 129552e3d6
Rm deprecated (#15920)
Remove the usage of deprecated methods in the test runner.
8 months ago
Nuno Campos 438beb6c94
Pass config specs through ensemble retriever (#15917)
<!-- Thank you for contributing to LangChain!

Please title your PR "<package>: <description>", where <package> is
whichever of langchain, community, core, experimental, etc. is being
modified.

Replace this entire comment with:
  - **Description:** a description of the change, 
  - **Issue:** the issue # it fixes if applicable,
  - **Dependencies:** any dependencies required for this change,
- **Twitter handle:** we announce bigger features on Twitter. If your PR
gets announced, and you'd like a mention, we'll gladly shout you out!

Please make sure your PR is passing linting and testing before
submitting. Run `make format`, `make lint` and `make test` from the root
of the package you've modified to check this locally.

See contribution guidelines for more information on how to write/run
tests, lint, etc: https://python.langchain.com/docs/contributing/

If you're adding a new integration, please include:
1. a test for the integration, preferably unit tests that do not rely on
network access,
2. an example notebook showing its use. It lives in
`docs/docs/integrations` directory.

If no one reviews your PR within a few days, please @-mention one of
@baskaryan, @eyurtsev, @hwchase17.
 -->

---------

Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
8 months ago
Erick Friis ebb6ad4f7a
mistralai[patch]: release 0.0.2 (#15912) 8 months ago
Erick Friis 437cebc955
core[patch]: release 0.1.10 (#15911) 8 months ago
Harrison Chase 80d41a8da3
add old serializable mapping (#15906) 8 months ago
Erick Friis 623f87c888
community[patch]: pinecone bug (#15905) 8 months ago
Eugene Yurtsev 44101b6b0e
Docs[patch]: Update OpenAI tools agent description (#15896)
Update OpenAI tools agent description.
8 months ago
Eugene Yurtsev 46b7a8d913
Docs[patch]: Update agent quick start for agents (#15892)
Minor change:

1) Update tool invocation to use .invoke
2) Show hub prompt
8 months ago
Jacob Lee c11dbefedc
docs[patch]: Fix bad headers in output parser docs (#15778)
Currently looks like this:

<img width="282" alt="Screenshot 2024-01-09 at 1 08 53 PM"
src="https://github.com/langchain-ai/langchain/assets/6952323/58f3d368-6588-418e-8502-30d13757cb99">

CC @efriis @baskaryan
8 months ago
Christophe Bornet c56060bb7d
Add document loader section to Astra provider doc page (#15882)
See preview:
https://langchain-git-fork-cbornet-provider-astra-doc-loader-langchain.vercel.app/docs/integrations/providers/astradb#ocument-loader
8 months ago
xvjixiang 611f18c944
Docs: Fix a typo in elasticsearch vectorstore notebook (#15807)
<!-- Thank you for contributing to LangChain!

Please title your PR "<package>: <description>", where <package> is
whichever of langchain, community, core, experimental, etc. is being
modified.

Replace this entire comment with:
  - **Description:** a description of the change, 
  - **Issue:** the issue # it fixes if applicable,
  - **Dependencies:** any dependencies required for this change,
- **Twitter handle:** we announce bigger features on Twitter. If your PR
gets announced, and you'd like a mention, we'll gladly shout you out!

Please make sure your PR is passing linting and testing before
submitting. Run `make format`, `make lint` and `make test` from the root
of the package you've modified to check this locally.

See contribution guidelines for more information on how to write/run
tests, lint, etc: https://python.langchain.com/docs/contributing/

If you're adding a new integration, please include:
1. a test for the integration, preferably unit tests that do not rely on
network access,
2. an example notebook showing its use. It lives in
`docs/docs/integrations` directory.

If no one reviews your PR within a few days, please @-mention one of
@baskaryan, @eyurtsev, @hwchase17.
 -->
8 months ago
axiangcoding d5aa277b94
community: add collection_properties parameter to Milvus (#15788)
- **Description:** add collection_properties parameter to Milvus. See
[pymilvus set_properties()
description](https://milvus.io/api-reference/pymilvus/v2.3.x/Collection/set_properties().md)
  - **Issue:** None
  - **Dependencies:** None
  - **Twitter handle:** None
8 months ago
mogith-pn 9e1ed17bfb
Community : Modified doc strings and example notebook for Clarifai (#15816)
Community : Modified doc strings and example notebook for Clarifai

Description:
1. Modified doc strings inside clarifai vectorstore class and
embeddings.
2. Modified notebook examples.

---------

Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
8 months ago
Harrison Chase 97411e998f
[docs] add beautiful soup dependency (#15860) 8 months ago
Daniel 6d299a55c0
docs: Update cohere.mdx, Text embedding had incorrect code snippet (#15840)
text embedding code snippet was incorrect.
8 months ago
Sagar B Manjunath e6240fecab
templates: Add NVIDIA Canonical RAG example chain (#15758)
- **Description:** Adds a RAG template that uses NVIDIA AI playground
and embedding models, along with Milvus vector store

- **Dependencies:** This template depends on the AI playground service
in NVIDIA NGC. API keys with a significant trial compute are available
(10k queries at the time of writing). This template also depends on the
Milvus Vector store which is publicly available.

Note: [A quick link to get a
key](https://catalog.ngc.nvidia.com/orgs/nvidia/teams/ai-foundation/models/codellama-13b/api)
when you have an NGC account. Generate Key button at the top right of
the code window.

---------

Co-authored-by: Sagar B Manjunath <sbogadimanju@nvidia.com>
Co-authored-by: Erick Friis <erick@langchain.dev>
8 months ago
Erick Friis 38523d7c57
together[minor]: add llm (#15853) 8 months ago
William FH 2895ca87cf
Update Evals Notebook (#15851) 8 months ago
Erick Friis ee708739c3
community[patch]: pinecone v3 support (#15849)
Info in slack

---------

Co-authored-by: Roie Schwaber-Cohen <roie.cohen@gmail.com>
8 months ago
Bagatur 18411c379c
docs: fix links (#15848) 8 months ago
Lance Martin 9c871f427b
TogetherAI RAG (#15846) 8 months ago
Eugene Yurtsev a06db53c37
Add unit tests to test openai tools agent (#15843)
This PR adds unit testing to test openai tools agent.
8 months ago
Harrison Chase 21a1538949
add raga reranker (#15838) 8 months ago
Eugene Yurtsev 45f49ca439
infra: fix issue preview (#15836)
Fixing the placeholder for the code example. GitHub collapses newlines
when
trying to use the text area, which is super confusing.
8 months ago
Eugene Yurtsev c425e6f740
More updates to issue template (#15833)
More update to issue template
8 months ago
Eugene Yurtsev 65980c22b8
Infra: Fix syntax error in BUG REPORT template (#15831)
Fix syntax error in issue template
8 months ago