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: Add Zep Cloud components + docs + examples #21671

Merged
merged 29 commits into from
May 27, 2024

Conversation

paul-paliychuk
Copy link
Contributor

@paul-paliychuk paul-paliychuk commented May 14, 2024

Thank you for contributing to LangChain!

  • PR title: community: Add Zep Cloud components + docs + examples

  • PR message:
    We have recently released our new zep-cloud sdks that are compatible with Zep Cloud (not Zep Open Source). We have also maintained our Cloud version of langchain components (ChatMessageHistory, VectorStore) as part of our sdks. This PRs goal is to port these components to langchain community repo, and close the gap with the existing Zep Open Source components already present in community repo (added ZepCloudMemory,ZepCloudVectorStore,ZepCloudRetriever).
    Also added a ZepCloudChatMessageHistory components together with an expression language example ported from our repo. We have left the original open source components intact on purpose as to not introduce any breaking changes.

    • Issue: -
    • Dependencies: Added optional dependency of our new cloud sdk zep-cloud
    • Twitter handle: @paulpaliychuk51
  • Add tests and docs

  • Lint and test: Run make format, make lint and make test from the root of the package(s) you've modified. See contribution guidelines for more: https://python.langchain.com/docs/contributing/

Additional guidelines:

  • Make sure optional dependencies are imported within a function.
  • Please do not add dependencies to pyproject.toml files (even optional ones) unless they are required for unit tests.
  • Most PRs should not touch more than one package.
  • Changes should be backwards compatible.
  • If you are adding something to community, do not re-import it in langchain.

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

Copy link

vercel bot commented May 14, 2024

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

Name Status Preview Comments Updated (UTC)
langchain ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 25, 2024 1:00am

@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. Ɑ: memory Related to memory module Ɑ: retriever Related to retriever module Ɑ: vector store Related to vector store module 🤖:docs Changes to documentation and examples, like .md, .rst, .ipynb files. Changes to the docs/ folder labels May 14, 2024
@paul-paliychuk
Copy link
Contributor Author

Looking into linter errors

Copy link
Collaborator

@baskaryan baskaryan left a comment

Choose a reason for hiding this comment

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

just double checking, there's no nice way to merge the local and cloud integrations is there? think it'd make for a slightly nicer devx but shouldn't force it if the local and cloud interfaces are totally different

@paul-paliychuk
Copy link
Contributor Author

@baskaryan Our Cloud APIs have diverged from Open Source, both from an API and functionality perspective. The API will likely be harmonized soon, but the functionality will stay differentiated. We have two sets of SDKs as a result.

We don't want to break the existing components for the open source users.
Additionally, we want to avoid confusion for the cloud users about the sdk arguments, and just point them to the cloud components.

Comment on lines 13 to 18
try:
from zep_cloud import MemorySearchResult, SearchScope, SearchType
from zep_cloud.client import AsyncZep, Zep

class ZepCloudRetriever(BaseRetriever):
"""`Zep Cloud` MemoryStore Retriever.
Copy link
Collaborator

Choose a reason for hiding this comment

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

this type of definition will prevent this class from being properly documented in the API reference. Would it be better to just remove the typing from the pydantic attributes (eg zep_client: Any instead of zep_client: Zep)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Roger that, addressed. Also did the same for async client.

Copy link
Collaborator

Choose a reason for hiding this comment

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

sorry should've been clearer, we need to remove the class definition from the try/except clause for it to be documented

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@baskaryan my bad, removed the try/except clause.

@dosubot dosubot bot added the lgtm PR looks good. Use to confirm that a PR is ready for merging. label May 27, 2024
@baskaryan baskaryan merged commit 342df7c into langchain-ai:master May 27, 2024
44 checks passed
hinthornw pushed a commit that referenced this pull request Jun 20, 2024
Thank you for contributing to LangChain!

- [x] **PR title**: community: Add Zep Cloud components + docs +
examples

- [x] **PR message**: 
We have recently released our new zep-cloud sdks that are compatible
with Zep Cloud (not Zep Open Source). We have also maintained our Cloud
version of langchain components (ChatMessageHistory, VectorStore) as
part of our sdks. This PRs goal is to port these components to langchain
community repo, and close the gap with the existing Zep Open Source
components already present in community repo (added
ZepCloudMemory,ZepCloudVectorStore,ZepCloudRetriever).
Also added a ZepCloudChatMessageHistory components together with an
expression language example ported from our repo. We have left the
original open source components intact on purpose as to not introduce
any breaking changes.
    - **Issue:** -
- **Dependencies:** Added optional dependency of our new cloud sdk
`zep-cloud`
    - **Twitter handle:** @paulpaliychuk51


- [x] **Add tests and docs**


- [x] **Lint and test**: Run `make format`, `make lint` and `make test`
from the root of the package(s) you've modified. See contribution
guidelines for more: https://python.langchain.com/docs/contributing/

Additional guidelines:
- Make sure optional dependencies are imported within a function.
- Please do not add dependencies to pyproject.toml files (even optional
ones) unless they are required for unit tests.
- Most PRs should not touch more than one package.
- Changes should be backwards compatible.
- If you are adding something to community, do not re-import it in
langchain.

If no one reviews your PR within a few days, please @-mention one of
baskaryan, efriis, eyurtsev, hwchase17.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖:docs Changes to documentation and examples, like .md, .rst, .ipynb files. Changes to the docs/ folder lgtm PR looks good. Use to confirm that a PR is ready for merging. Ɑ: memory Related to memory module Ɑ: retriever Related to retriever module size:XXL This PR changes 1000+ lines, ignoring generated files. Ɑ: vector store Related to vector store module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants