From 89f8b181c598441138132d066d7fdb383d2804e8 Mon Sep 17 00:00:00 2001 From: zhilv Date: Sat, 29 Nov 2025 11:33:58 +0800 Subject: [PATCH] =?UTF-8?q?fix(ai):=20=E4=BF=AE=E5=A4=8D=E8=AF=AD=E4=B9=89?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deepseek.py | 2 +- doubao.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deepseek.py b/deepseek.py index b440529..9c611bb 100644 --- a/deepseek.py +++ b/deepseek.py @@ -22,7 +22,7 @@ class DeepSeek: def __init__(self) -> None: self.key = os.environ.get("DEEPSEEK_API_KEY") - if self.key: + if not self.key: raise Exception("找不到 DEEPSEEK_API_KEY 请设置环境变量在运行代码") self.client = OpenAI( api_key=self.key, diff --git a/doubao.py b/doubao.py index 375393b..7ac3bce 100644 --- a/doubao.py +++ b/doubao.py @@ -22,7 +22,7 @@ class DOUBAO: def __init__(self) -> None: self.key = os.environ.get("DOUBAO_API_KEY") - if self.key: + if not self.key: raise Exception("找不到 DOUBAO_API_KEY 请设置环境变量在运行代码") self.client = OpenAI( api_key=self.key,