diff --git a/gateway/chatgpt.py b/gateway/chatgpt.py index 8ed9afd..31f5bbc 100644 --- a/gateway/chatgpt.py +++ b/gateway/chatgpt.py @@ -7,6 +7,8 @@ from app import app, templates from gateway.login import login_html from utils.kv_utils import set_value_for_key +import utils.configs as configs +import utils.globals as globals with open("templates/chatgpt_context.json", "r", encoding="utf-8") as f: chatgpt_context = json.load(f) @@ -22,6 +24,8 @@ async def chatgpt_html(request: Request): if len(token) != 45 and not token.startswith("eyJhbGciOi"): token = quote(token) + if configs.auto_seed == False and token not in globals.seed_map.keys(): + return await login_html(request) user_remix_context = chatgpt_context.copy() set_value_for_key(user_remix_context, "user", {"id": "user-chatgpt"})