Invoking an edge function via Supabase trigger/function
Hi all,
I'm working on implementing a RAG system in Supabase. Here's the desired flow for the part I'm focusing on at the moment:
New row is inserted in "document_chunks" table -> trigger fires to execute function "call_embed_edge_function" -> function runs, sends http post request to invoke "embed" edge function and pass "chunk_id" and "chunk_content" to it -> edge function runs, generates embed and updates row based on "chunk_id"
The issue I'm having now is that, while I've troubleshooted my trigger + function to the point where I don't get Supabase errors on attempting insert into "document_chunks", my edge function is still not getting invoked i.e. both invocations and logs are completely empty in the dashboard.
Here are the function & trigger definitions for reference:
Anyone see what I'm doing wrong?
Thanks,
GD
I'm working on implementing a RAG system in Supabase. Here's the desired flow for the part I'm focusing on at the moment:
New row is inserted in "document_chunks" table -> trigger fires to execute function "call_embed_edge_function" -> function runs, sends http post request to invoke "embed" edge function and pass "chunk_id" and "chunk_content" to it -> edge function runs, generates embed and updates row based on "chunk_id"
The issue I'm having now is that, while I've troubleshooted my trigger + function to the point where I don't get Supabase errors on attempting insert into "document_chunks", my edge function is still not getting invoked i.e. both invocations and logs are completely empty in the dashboard.
Here are the function & trigger definitions for reference:
Anyone see what I'm doing wrong?
Thanks,
GD