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

feat: add momento vector index as a vector store provider #11567

Merged
merged 7 commits into from Oct 9, 2023

Conversation

malandis
Copy link
Contributor

@malandis malandis commented Oct 9, 2023

Description:

  • Added Momento Vector Index (MVI) as a vector store provider. This includes an implementation with docstrings, integration tests, a notebook, and documentation on the docs pages.
  • Updated the Momento dependency in pyproject.toml and the lock file to enable access to MVI.
  • Refactored the Momento cache and chat history session store to prefer using "MOMENTO_API_KEY" over "MOMENTO_AUTH_TOKEN" for consistency with MVI. This change is backwards compatible with the previous "auth_token" variable usage. Updated the code and tests accordingly.

Dependencies:

  • Updated Momento dependency in pyproject.toml.

Testing:

  • Run the integration tests with a Momento API key. Get one at the Momento Console for free. MVI is available in AWS us-west-2 with a superuser key.
  • MOMENTO_API_KEY=<your key> poetry run pytest tests/integration_tests/vectorstores/test_momento_vector_index.py

Tag maintainer:

@eyurtsev

Twitter handle:

Please mention @momentohq for this addition to langchain. With the integration of Momento Vector Index, Momento caching, and session store, Momento provides serverless support for the core langchain data needs.

Also mention @mlonml for the integration.

@vercel
Copy link

vercel bot commented Oct 9, 2023

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 Oct 9, 2023 8:47pm

@dosubot dosubot bot added Ɑ: vector store Related to vector store module 🤖:enhancement A large net-new component, integration, or chain. Use sparingly. The largest features labels Oct 9, 2023
Adds Momento Vector Index as a vector store provider. Provides
implementation, integration tests, examples, and documentation.
The standard in the Momento ecosystem is now to refer to
`MOMENTO_API_KEY` as opposed to `MOMENTO_AUTH_TOKEN`. This changes
refactors to prefer the former, while keeping backwards compatibility.
For ease of use allow users to instantiate the client either by
passing in a client object (dependency injection) or with the client
parameters.
@malandis
Copy link
Contributor Author

malandis commented Oct 9, 2023

I rebased and solved merge conflicts in ded2e78

)
"""

_client: "PreviewVectorIndexClient"
Copy link
Collaborator

Choose a reason for hiding this comment

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

VectorStore isn't a pydantic BaseModel, so these will all be class attributes. is that intentional?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No it wasn't. Good catch!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in d9010a6

@baskaryan
Copy link
Collaborator

lgtm, thanks @malandis!

@baskaryan baskaryan merged commit 8e45f72 into langchain-ai:master Oct 9, 2023
32 checks passed
@malandis malandis deleted the feat/momento-vector-index branch October 10, 2023 18:16
@malandis
Copy link
Contributor Author

Thanks @baskaryan and @hwchase17 🙇 . Any chance @momentohq can get a Twitter shoutout for the contribution so we can reshare also 🙏 ?

hoanq1811 pushed a commit to hoanq1811/langchain that referenced this pull request Feb 2, 2024
…ai#11567)

**Description**:

- Added Momento Vector Index (MVI) as a vector store provider. This
includes an implementation with docstrings, integration tests, a
notebook, and documentation on the docs pages.
- Updated the Momento dependency in pyproject.toml and the lock file to
enable access to MVI.
- Refactored the Momento cache and chat history session store to prefer
using "MOMENTO_API_KEY" over "MOMENTO_AUTH_TOKEN" for consistency with
MVI. This change is backwards compatible with the previous "auth_token"
variable usage. Updated the code and tests accordingly.

**Dependencies**:

- Updated Momento dependency in pyproject.toml.

**Testing**:

- Run the integration tests with a Momento API key. Get one at the
[Momento Console](https://console.gomomento.com) for free. MVI is
available in AWS us-west-2 with a superuser key.
- `MOMENTO_API_KEY=<your key> poetry run pytest
tests/integration_tests/vectorstores/test_momento_vector_index.py`

**Tag maintainer:**

@eyurtsev

**Twitter handle**:

Please mention @momentohq for this addition to langchain. With the
integration of Momento Vector Index, Momento caching, and session store,
Momento provides serverless support for the core langchain data needs.

Also mention @mlonml for the integration.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖:enhancement A large net-new component, integration, or chain. Use sparingly. The largest features Ɑ: vector store Related to vector store module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants