Skip to main content

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

  1. Install Gel's Python binding and this package
pip install gel langchain-gel
  1. Initialize the project

Locally:

gel project init

In the cloud:

gel project init --server-instance <org-name>/<instance-name>
  1. Add necessary components to the schema. Gel uses explicit schema and migrations, which gives you more control and preserves data integrity. langchain-gel expects 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
  1. Use GelVectorStore as 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)

Source distribution for langchain-gel 1.0.1
File Size Uploaded
langchain_gel-1.0.1.tar.gz 86.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for langchain-gel 1.0.1
File Interpreter ABI Platform
langchain_gel-1.0.1-py3-none-any.whl Python 3 none any Details

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 log

Release 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 log

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page