mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-12-23 23:22:15 +03:00
be7acf052b
* 🌱 list files in storage & generate signed URL * ✨ add knowledge router * 🗃️ add knowledge tables * ✨ add knowledge during upload * 🚧 add knowledge a brain_knowledge models and repo * 🔥 remove brain_knowledge * ✨ add upload to knowledge table * ✨ add crawl to knowledge table * ✏️ fixes
42 lines
998 B
Python
42 lines
998 B
Python
from logger import get_logger
|
|
from models.databases.supabase import (
|
|
ApiKeyHandler,
|
|
Brain,
|
|
BrainSubscription,
|
|
Chats,
|
|
File,
|
|
Knowledges,
|
|
Notifications,
|
|
Prompts,
|
|
UserUsage,
|
|
Vector,
|
|
)
|
|
|
|
logger = get_logger(__name__)
|
|
|
|
|
|
class SupabaseDB(
|
|
Brain,
|
|
UserUsage,
|
|
File,
|
|
BrainSubscription,
|
|
ApiKeyHandler,
|
|
Chats,
|
|
Vector,
|
|
Prompts,
|
|
Notifications,
|
|
Knowledges,
|
|
):
|
|
def __init__(self, supabase_client):
|
|
self.db = supabase_client
|
|
Brain.__init__(self, supabase_client)
|
|
UserUsage.__init__(self, supabase_client)
|
|
File.__init__(self, supabase_client)
|
|
BrainSubscription.__init__(self, supabase_client)
|
|
ApiKeyHandler.__init__(self, supabase_client)
|
|
Chats.__init__(self, supabase_client)
|
|
Vector.__init__(self, supabase_client)
|
|
Prompts.__init__(self, supabase_client)
|
|
Notifications.__init__(self, supabase_client)
|
|
Knowledges.__init__(self, supabase_client)
|