Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions gateway/chatgpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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"})
Expand Down