all AI news
Supabase helper for better RPC function typing with jsonb fields
May 9, 2024, 1:45 a.m. | Olivier
DEV Community dev.to
The problem
When you have those tables used for say vector search... you usually have a jsonb field for metadata like this:
create table
documents (
id text not null,
vector extensions.vector null,
content text not null,
---v--- this field
metadata jsonb null,
constraint documents_pkey primary key (id)
)
Where let's say you always have this in your jsonb metadata
type Metadata = {
sourceUrl: string
otherField: string
}
But when you do a supabase call say supabase.rpc('match_vec_doc', args)... even …
create documents extensions fields function key llm metadata null rpc search supabase table tables text typescript typing vector vectordatabase vector search
More from dev.to / DEV Community
Jobs in AI, ML, Big Data
Software Engineer for AI Training Data (School Specific)
@ G2i Inc | Remote
Software Engineer for AI Training Data (Python)
@ G2i Inc | Remote
Software Engineer for AI Training Data (Tier 2)
@ G2i Inc | Remote
Data Engineer
@ Lemon.io | Remote: Europe, LATAM, Canada, UK, Asia, Oceania
Artificial Intelligence – Bioinformatic Expert
@ University of Texas Medical Branch | Galveston, TX
Lead Developer (AI)
@ Cere Network | San Francisco, US