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

docs: CrateDB: Register package langchain-cratedb, and add minimal "provider" documentation #28877

Merged

Conversation

amotl
Copy link
Contributor

@amotl amotl commented Dec 22, 2024

Hi Erick. Coming back from a previous attempt, we now made a separate package for the CrateDB adapter, called langchain-cratedb, as advised. Other than registering the package within libs/packages.yml, this patch includes a minimal amount of documentation to accompany the advent of this new package. Let us know about any mistakes we made, or changes you would like to see. Thanks, Andreas.

About

Status

Backlog?

Is this applicable for this kind of patch?

  • Add tests and docs: 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.

Q&A

  1. Notebooks that use the LangChain CrateDB adapter are currently at CrateDB LangChain Examples, and the documentation refers to them. Because they are derived from very old blueprints coming from LangChain 0.0.x times, we guess they need a refresh before adding them to docs/docs/integrations. Is it applicable to merge this minimal package registration + documentation patch, which already includes valid code snippets in cratedb.mdx, and add corresponding notebooks on behalf of a subsequent patch later?

  2. How would it work getting into the tabular list of Integration Packages enumerated on the documentation entrypoint page about Providers?

/cc Please also review, @ckurze, @wierdvanderhaar, @kneth, @simonprickett, if you can find the time. Thanks!

@amotl amotl requested a review from efriis as a code owner December 22, 2024 05:15
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Dec 22, 2024
Copy link

vercel bot commented Dec 22, 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 Dec 22, 2024 5:23am

@dosubot dosubot bot added the 🤖:docs Changes to documentation and examples, like .md, .rst, .ipynb files. Changes to the docs/ folder label Dec 22, 2024
Copy link
Collaborator

@ccurme ccurme left a comment

Choose a reason for hiding this comment

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

Thanks very much for this. To your questions:

  1. Notebooks that use the LangChain CrateDB adapter are currently at CrateDB LangChain Examples, and the documentation refers to them. Because they are derived from very old blueprints coming from LangChain 0.0.x times, we guess they need a refresh before adding them to docs/docs/integrations. Is it applicable to merge this minimal package registration + documentation patch, which already includes valid code snippets in cratedb.mdx, and add corresponding notebooks on behalf of a subsequent patch later?

Yes, fine to add notebook for the specific components later. Cursory look suggests minimal examples (e.g., instantiating and using document loaders) could work as-is.

  1. How would it work getting into the tabular list of Integration Packages enumerated on the documentation entrypoint page about Providers?

We do not yet have a policy for this and are currently only including packages in the langchain-ai org. This table is built from the packages.yml file so if the policy is updated then langchain-cratedb should be picked up automatically.

[free trial][CrateDB Cloud Console].

### Install Client
Install the most recent version of the `langchain-cratedb` package
Copy link
Collaborator

Choose a reason for hiding this comment

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

Consider linking to langchain-cratedb repo or pypi somewhere near the top of this page.

export OPENAI_API_KEY=sk-XJZ...
```
```python
from langchain_community.document_loaders import UnstructuredURLLoader
Copy link
Collaborator

Choose a reason for hiding this comment

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

I believe langchain-unstructured can load web pages as well.

Copy link
Contributor Author

@amotl amotl Dec 24, 2024

Choose a reason for hiding this comment

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

Thanks for this suggestion, we are always aiming to follow most recent developments in LangChain, and already recognized langchain-unstructured to be a real powerhouse.

I just tried to bring it in, but a drawback to use it for minimal examples could be the large array of dependencies it pulls in.

$ uv pip install langchain-unstructured
Resolved 45 packages in 598ms
Prepared 5 packages in 3.44s
Uninstalled 2 packages in 19ms
Installed 16 packages in 86ms
 + aiofiles==24.1.0
 + coloredlogs==15.0.1
 + cryptography==44.0.0
 + eval-type-backport==0.2.2
 + flatbuffers==24.12.23
 + humanfriendly==10.0
 + jsonpath-python==1.0.6
 + langchain-unstructured==0.1.6
 + mpmath==1.3.0
 + onnxruntime==1.19.2
 + protobuf==5.29.2
 - pydantic==2.10.4
 + pydantic==2.9.2
 - pydantic-core==2.27.2
 + pydantic-core==2.23.4
 + pypdf==5.1.0
 + sympy==1.13.3
 + unstructured-client==0.28.1

@dosubot dosubot bot added the lgtm PR looks good. Use to confirm that a PR is ready for merging. label Dec 23, 2024
@ccurme ccurme merged commit 6352edf into langchain-ai:master Dec 23, 2024
13 checks passed
@amotl
Copy link
Contributor Author

amotl commented Dec 24, 2024

Thanks a stack for the quick merge, @ccurme, and also thanks for your feedback. I will apply your suggestions on the next iteration when sending updates. 🙇

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. size:L This PR changes 100-499 lines, ignoring generated files.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants