Generate embeddings with Portkey and store them in Supabase pgvector
Supabase provides Postgres with pgvector for AI applications. With Portkey, generate embeddings using 1600+ models and store them in Supabase for efficient retrieval.
# Generate embeddingresponse = client.embeddings.create( model="text-embedding-ada-002", input="The food was delicious and the waiter...")embedding = response.data[0].embedding# Store in Supabaseresult = supabase.table('documents').insert({ "content": "The food was delicious and the waiter...", "embedding": embedding}).execute()