Liberty and Embeddings for All
Introduction · Tech Stack + Features ·
GradientFlow is a community-driven collection of open-source embeddings, ready for you to train your AI, perform multimodal semantic search, and fine-tune.
The below may change soon as we rebuild on Akash Network.
- Vercel, for the frontend
- Tailwind CSS
- Radix
- Framer Motion
- Lucide, just a few left
@next/font
@vercel/og
react-wrap-balancer
- Easy React-pastable emojis
- Currently using t-SNE, may switch to other options. linear time complexity??. idk about andrej's
npx prisma db push
, be aware that this will drop and recreate the tables
npx prisma generate
then runs to generate the client
This function lives on supabase:
create or replace function match_documents (
query_embedding vector(1536),
similarity_threshold float,
match_count int
)
returns table (
id int4,
content text,
similarity float
)
language plpgsql
as $$
begin
return query
select
"Documents".id,
"Documents".content,
(1 - ("Documents".embedding <=> query_embedding)) as similarity
from "Documents"
where (1 - ("Documents".embedding <=> query_embedding)) > similarity_threshold
order by "Documents".embedding <=> query_embedding
limit match_count;
end;
$$;
-- you can call the function from your browser with supabase-js
-- const { data, error } = await supabase.rpc('match_documents', { query_embedding: [], similarity_threshold: 0.5, match_count: 10 })
-- <-> Euclidean distance
-- <#> negative inner product
-- <=> cosine distance
-- OpenAI recommends cosine similarity on their embeddings, so we will use that here.
- configure policies for supa
- Convert dashboard [ from Bootstrap to Tailwind ](https://tools.bitfertig.de/bootstrap2tailwind/index.php)
- Add [ Tailwind styled components ](https://github.com/MathiasGilson/tailwind-styled-component)