Spaces:
Runtime error
Runtime error
File size: 500 Bytes
ed0b977 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
import sys
import os
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '../../')))
from main import app
from utils.db.db import mongo
def create_chat_session_collection():
with app.app_context():
try:
mongo.db.create_collection("chatsession")
print("Collection 'chatsession' created successfully.")
except Exception as e:
print(f"An error occurred: {e}")
if __name__ == "__main__":
create_chat_session_collection()
|