mirror of
https://github.com/harivansh-afk/RAG-ui.git
synced 2026-04-18 10:03:33 +00:00
Working frontend interface with supabse storage
This commit is contained in:
parent
ae239a2849
commit
1eb339623c
19 changed files with 1150 additions and 422 deletions
36
src/types/supabase.ts
Normal file
36
src/types/supabase.ts
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
export interface ChatInstance {
|
||||
id: string;
|
||||
created_at: string;
|
||||
user_id: string;
|
||||
title: string;
|
||||
last_message_at: string;
|
||||
}
|
||||
|
||||
export interface ChatMessage {
|
||||
id: string;
|
||||
chat_id: string;
|
||||
content: string;
|
||||
role: 'user' | 'assistant';
|
||||
created_at: string;
|
||||
metadata?: {
|
||||
make_response_id?: string;
|
||||
error?: string;
|
||||
};
|
||||
}
|
||||
|
||||
export type Database = {
|
||||
public: {
|
||||
Tables: {
|
||||
chat_instances: {
|
||||
Row: ChatInstance;
|
||||
Insert: Omit<ChatInstance, 'id' | 'created_at'>;
|
||||
Update: Partial<Omit<ChatInstance, 'id' | 'created_at' | 'user_id'>>;
|
||||
};
|
||||
chat_messages: {
|
||||
Row: ChatMessage;
|
||||
Insert: Omit<ChatMessage, 'id' | 'created_at'>;
|
||||
Update: Partial<Omit<ChatMessage, 'id' | 'created_at' | 'chat_id'>>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue