community[minor]: Add support for Upstash Vector (#20824)

## Description

Adding `UpstashVectorStore` to utilize [Upstash
Vector](https://upstash.com/docs/vector/overall/getstarted)!

#17012 was opened to add Upstash Vector to langchain but was closed to
wait for filtering. Now filtering is added to Upstash vector and we open
a new PR. Additionally, [embedding
feature](https://upstash.com/docs/vector/features/embeddingmodels) was
added and we add this to our vectorstore aswell.

## Dependencies

[upstash-vector](https://pypi.org/project/upstash-vector/) should be
installed to use `UpstashVectorStore`. Didn't update dependencies
because of [this comment in the previous
PR](https://github.com/langchain-ai/langchain/pull/17012#pullrequestreview-1876522450).

## Tests

Tests are added and they pass. Tests are naturally network bound since
Upstash Vector is offered through an API.

There was [a discussion in the previous PR about mocking the
unittests](https://github.com/langchain-ai/langchain/pull/17012#pullrequestreview-1891820567).
We didn't make changes to this end yet. We can update the tests if you
can explain how the tests should be mocked.

---------

Co-authored-by: ytkimirti <yusuftaha9@gmail.com>
Co-authored-by: Bagatur <22008038+baskaryan@users.noreply.github.com>
Co-authored-by: Bagatur <baskaryan@gmail.com>
This commit is contained in:
Cahid Arda Öz
2024-04-30 00:25:01 +03:00
committed by GitHub
parent 1a2ff56cd8
commit cc6191cb90
37 changed files with 11751 additions and 4 deletions

View File

@@ -83,6 +83,7 @@ EXPECTED_ALL = [
"TileDB",
"TimescaleVector",
"Typesense",
"UpstashVectorStore",
"USearch",
"VDMS",
"Vald",

View File

@@ -85,6 +85,7 @@ def test_compatible_vectorstore_documentation() -> None:
"TileDB",
"TimescaleVector",
"TencentVectorDB",
"UpstashVectorStore",
"EcloudESVectorStore",
"Vald",
"VDMS",

View File

@@ -77,6 +77,7 @@ _EXPECTED = [
"Tigris",
"TimescaleVector",
"Typesense",
"UpstashVectorStore",
"USearch",
"Vald",
"VDMS",