Edit the schema. You need the following types to use the LangChain vectorstore:
Copy
Ask AI
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) }}
Note: this is the minimal setup. Feel free to add as many types, properties and links as you want!
Learn more about taking advantage of Gel’s schema by reading the docs.
Run the migration: gel migration create && gel migrate.