Add your description here
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file langchain_gel-0.1.0.tar.gz.
File metadata
- Download URL: langchain_gel-0.1.0.tar.gz
- Upload date:
- Size: 80.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
76cb4e45532a7be5d2a557f3d079b3c2743ced3a76b0461e7be32a6783c87c04
|
|
| MD5 |
143486eba1e7ac95cc729cd9a9394cf9
|
|
| BLAKE2b-256 |
6dc5b576a81a6c992437f187eb3a9cca4b849bcc05f68e782ab46a5c527f5b97
|
Provenance
The following attestation bundles were made for langchain_gel-0.1.0.tar.gz:
Publisher:
publish.yml on geldata/langchain-gel
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
langchain_gel-0.1.0.tar.gz -
Subject digest:
76cb4e45532a7be5d2a557f3d079b3c2743ced3a76b0461e7be32a6783c87c04 - Sigstore transparency entry: 203512988
- Sigstore integration time:
-
Permalink:
geldata/langchain-gel@e849fb271487de95da1e59b556c47b73a7d7ca8c -
Branch / Tag:
refs/heads/main - Owner: https://github.com/geldata
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e849fb271487de95da1e59b556c47b73a7d7ca8c -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file langchain_gel-0.1.0-py3-none-any.whl.
File metadata
- Download URL: langchain_gel-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe1d315194d42f6e28f1fda676bdaefa1d3eef66de2b6e91d7a36a283446d0a5
|
|
| MD5 |
f6f288890fd1b28e68f780f4390ae1ba
|
|
| BLAKE2b-256 |
b9278e3bca5839c2cba564ebc8207e00ee6a7c8d010a816ec794c589e18c5177
|
Provenance
The following attestation bundles were made for langchain_gel-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on geldata/langchain-gel
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
langchain_gel-0.1.0-py3-none-any.whl -
Subject digest:
fe1d315194d42f6e28f1fda676bdaefa1d3eef66de2b6e91d7a36a283446d0a5 - Sigstore transparency entry: 203512990
- Sigstore integration time:
-
Permalink:
geldata/langchain-gel@e849fb271487de95da1e59b556c47b73a7d7ca8c -
Branch / Tag:
refs/heads/main - Owner: https://github.com/geldata
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e849fb271487de95da1e59b556c47b73a7d7ca8c -
Trigger Event:
workflow_dispatch
-
Statement type: