You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As the LeapfrogAI UI I want to get a status update for the indexing of my files So that I can notify the user that their docs can be chatted with
Acceptance Criteria
Given I subscribe to the vectorStoreFileStatus table When a file is being indexed, has been successfully indexed, or failed to index Then I can get that status via Supabase Realtime on the frontend
Additional context
The API does not need to worry about pub/sub (realtime) functionality, it only needs to create a 'vectorStoreFileStatus' table and keep it up to date with vector_store_file's ids and status. When a file is attached to the vector store and sent to the vector stores endpoint, update the status to 'processing'. When complete, change to 'complete', if there is an error, update it to 'error'.
ex.:
{
"id": "vector_store_file_123",
"status": "processing"
}
CREATE TABLE vector_store_file_status (
id VARCHAR PRIMARY KEY,
status VARCHAR CHECK (status IN ('processing', 'complete', 'error'))
);
Row Level Security (RLS) should also be setup on the table so that users can only reference their own file uploads. This may required storing the user_id on the row as well.
FYI, The frontend will subscribe to the appropriate table and handle updates in realtime with something like this (issue #671):
ex.
User Story
As the LeapfrogAI UI
I want to get a status update for the indexing of my files
So that I can notify the user that their docs can be chatted with
Acceptance Criteria
Given I subscribe to the
vectorStoreFileStatus
tableWhen a file is being indexed, has been successfully indexed, or failed to index
Then I can get that status via Supabase Realtime on the frontend
Additional context
The API does not need to worry about pub/sub (realtime) functionality, it only needs to create a 'vectorStoreFileStatus' table and keep it up to date with
vector_store_file's
ids and status. When a file is attached to the vector store and sent to the vector stores endpoint, update the status to 'processing'. When complete, change to 'complete', if there is an error, update it to 'error'.ex.:
Row Level Security (RLS) should also be setup on the table so that users can only reference their own file uploads. This may required storing the user_id on the row as well.
FYI, The frontend will subscribe to the appropriate table and handle updates in realtime with something like this (issue #671):
ex.
The text was updated successfully, but these errors were encountered: