-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ff37e08
commit 7eaf595
Showing
4 changed files
with
11 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,13 @@ | ||
from importlib import util | ||
|
||
from nonebot.log import logger | ||
|
||
from Scripts.Config import config | ||
|
||
uuid_caches: dict[str, str] = {} | ||
cpu_occupation: dict[str, list] = {} | ||
ram_occupation: dict[str, list] = {} | ||
|
||
openai = None | ||
render_template = None | ||
|
||
if config.ai_enabled: | ||
if util.find_spec('openai') is None: | ||
logger.error('你已开启 Ai 功能,但却没有安装 OpenAi 库!请先安装后再启动。') | ||
exit(1) | ||
if config.image_mode: | ||
if util.find_spec('nonebot_plugin_htmlrender') is None: | ||
logger.error('你已开启图片模式,但却没有安装对应的库!请先安装后再启动。') | ||
exit(1) | ||
from .Render import render_template | ||
|
||
# LtNsttMj1tUSaieZRjvHHk2h2AZOEKIG | ||
# https://crafatar.com/avatars/{uuid} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters