File size: 689 Bytes
39c6de5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
"""
Database Connection
"""

from pymongo import MongoClient
from pymongo.server_api import ServerApi
import os

MONGO_URI = os.getenv("MONGO_URI", "")

mongo_client = MongoClient(MONGO_URI, server_api=ServerApi("1"))
mongo_db = mongo_client["neuraprompt"]

# Export collections
long_term_memory_col = mongo_db["long_term_memory"]
chat_history_col = mongo_db["chat_history"]
user_personas_col = mongo_db["user_personas"]
subscriptions_col = mongo_db["subscriptions"]
images_col = mongo_db["user_images"]
downloads_col = mongo_db["file_downloads"]
learning_paths_col = mongo_db["learning_paths"]
email_notifications_col = mongo_db["email_notifications"]

fs = None  # GridFS if needed later