Skip to content

Commit

Permalink
fix: not logged in
Browse files Browse the repository at this point in the history
  • Loading branch information
lss233 committed Dec 14, 2022
1 parent 35f3974 commit 1f0c98f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion chatbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from loguru import logger
import json
import os
import asyncio

with open("config.json", "rb") as f:
guessed_json = from_bytes(f.read()).best()
Expand All @@ -20,7 +21,8 @@
logger.info("如果您使用 xpra,请使用自己的浏览器访问 xpra 程序的端口,以访问到本程序启动的浏览器。")

bot = AsyncChatbot(config=config.openai.dict(exclude_none=True, by_alias=False), conversation_id=None, base_url=config.openai.base_url)

if not "cf_clearance" in bot.config:
asyncio.run(bot.refresh_session())
logger.info("登录成功,保存登录信息中……")

if config.system.auto_save_cf_clearance:
Expand Down

0 comments on commit 1f0c98f

Please sign in to comment.