Zack Saadioui
8/26/2024
1
2
3
bash
git clone --branch v0.7.4 https://github.com/pgvector/pgvector.git
cd pgvector
1
2
bash
make install
1
2
sql
CREATE EXTENSION vector;
1
2
sql
SELECT * FROM pg_available_extensions WHERE name = 'vector';
1
2
3
4
5
sql
CREATE TABLE items (
id bigserial PRIMARY KEY,
embedding vector(3) -- Adjust this based on your dimensionality
);
1
2
sql
INSERT INTO items (embedding) VALUES ('[1, 2, 3]');
1
2
bash
pip install llama-index
1
StorageContext
1
You can now perform queries on your data, leveraging the vector embeddings stored in PGVector:
Copyright © Arsturn 2024