langchain-gel
This package enables LangChain to interact with Gel as a vectorstore. See LangChain's documentation to learn more about how to take advantage of that.
Note: check out Gel's AI extension to learn how to automate embedding management away while taking advantage of poweful schema and EdgeQL query language.
Usage
- Install Gel's Python binding and this package
pip install gel langchain-gel
- Initialize the project
Locally:
gel project init
In the cloud:
gel project init --server-instance <org-name>/<instance-name>
- Add necessary components to the schema. Gel uses explicit schema and migrations, which gives you more control and preserves data integrity.
langchain-gelexpects the following schema:
using extension pgvector;
module default {
scalar type EmbeddingVector extending ext::pgvector::vector<1536>;
type Record {
required collection: str;
text: str;
embedding: EmbeddingVector;
external_id: str {
constraint exclusive;
};
metadata: json;
index ext::pgvector::hnsw_cosine(m := 16, ef_construction := 128)
on (.embedding)
}
}
Copy-paste this to dbschema/default.gel and run a migration:
gel migration create \
&& gel migrate
- Use
GelVectorStoreas usual. It's a drop-in replacement for any other vectorstore in the LangChain ecosystem.
from langchain_gel import GelVectorStore
vectorstore = GelVectorStore()
Next steps
When you are ready to migrate to Gel's native vector handling, check out Gel's documentation to find instructions.
Metadata
Release files for langchain-gel 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| langchain_gel-1.0.1.tar.gz | 86.5 kB | With provenance | Details for langchain_gel-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| langchain_gel-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for langchain_gel-1.0.1-py3-none-any.whl |
Total release size: 97.6 kB
Release files / langchain_gel-1.0.1.tar.gz
| Download URL | langchain_gel-1.0.1.tar.gz |
|---|---|
| Size | 86.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5a032f0fb8edbcc0c6edf70cf8095238f94b4486e969d85a8855b452fc2a0d5d
|
|
BLAKE2b-256 checksum How to use checksums |
54d00ebabde6efca52c71afabc548cedffbce92756adf0b0980b4e5a8bf2e51a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 14, 2025.
Transparency logRelease files / langchain_gel-1.0.1-py3-none-any.whl
| Download URL | langchain_gel-1.0.1-py3-none-any.whl |
|---|---|
| Size | 11.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7e9bb027fa30d40400e189c9bea08bb4f8528f3f9144a525abf0f6bedeb197ea
|
|
BLAKE2b-256 checksum How to use checksums |
6eb927e65aa928fb7da7ecf457a50a1edf5c0ad1b4a37d0f64438289be201e55
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 14, 2025.
Transparency logSecurity for langchain-gel 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for langchain_gel-1.0.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 14, 2025.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.