Skip to content

Commit

Permalink
chore: update feeds table init
Browse files Browse the repository at this point in the history
  • Loading branch information
luigibarbato committed Jan 22, 2024
1 parent 60b722e commit f70ca76
Showing 1 changed file with 4 additions and 19 deletions.
23 changes: 4 additions & 19 deletions db/init.sql
Original file line number Diff line number Diff line change
@@ -1,30 +1,15 @@
-- Install the extension we just compiled

CREATE EXTENSION IF NOT EXISTS vector;
CREATE EXTENSION IF NOT EXISTS pg_trgm;
CREATE EXTENSION IF NOT EXISTS fuzzystrmatch;

/*
For simplicity, we are directly adding the content into this table as
a column containing text data. It could easily be a foreign key pointing to
another table instead that has the content you want to vectorize for
semantic search, just storing here the vectorized content in our "items" table.
"768" dimensions for our vector embedding is critical - that is the
number of dimensions our open source embeddings model output, for later in the
blog post.
*/

CREATE TABLE feeds (
id SERIAL PRIMARY KEY,
title VARCHAR(255) NOT NULL,
link VARCHAR(255) NOT NULL,
link VARCHAR(255) PRIMARY KEY,
language VARCHAR(10),
image_title VARCHAR(255),
image_url VARCHAR(255),
image_width INT,
image_height INT,
summary TEXT,
source VARCHAR(255),
date TIMESTAMP,
embedding vector(768)
date timestamp,
embedding vector(384)
);

0 comments on commit f70ca76

Please sign in to comment.