Update data_source.py

This commit is contained in:
HibiKier 2021-11-05 16:48:28 +08:00 committed by GitHub
parent 185f7d9c31
commit dcb538a3a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 = {