From dcb538a3a983a1eaa856d23adca131c0423a5922 Mon Sep 17 00:00:00 2001 From: HibiKier <45528451+HibiKier@users.noreply.github.com> Date: Fri, 5 Nov 2021 16:48:28 +0800 Subject: [PATCH] Update data_source.py --- plugins/ai/data_source.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/ai/data_source.py b/plugins/ai/data_source.py index d36005ae..1cbbb2dc 100644 --- a/plugins/ai/data_source.py +++ b/plugins/ai/data_source.py @@ -70,6 +70,8 @@ async def tu_ling(text: str, img_url: str, user_id: int, sess: ClientSession) -> """ global index TL_KEY = Config.get_config("ai", "TL_KEY") + if not TL_KEY: + return '' try: if text: req = {