From 88173db4cef8f868e7de2d38f412743e02314ccb Mon Sep 17 00:00:00 2001 From: jxxghp Date: Mon, 24 Nov 2025 21:29:56 +0800 Subject: [PATCH] fix #5172 --- app/agent/__init__.py | 2 -- app/chain/message.py | 11 ----------- 2 files changed, 13 deletions(-) diff --git a/app/agent/__init__.py b/app/agent/__init__.py index 96ef40f7..95841f85 100644 --- a/app/agent/__init__.py +++ b/app/agent/__init__.py @@ -73,8 +73,6 @@ class MoviePilotAgent: """初始化LLM模型""" provider = settings.LLM_PROVIDER.lower() api_key = settings.LLM_API_KEY - if not api_key: - raise ValueError("未配置 LLM_API_KEY") if provider == "google": import os diff --git a/app/chain/message.py b/app/chain/message.py index 4378b243..ab5ae807 100644 --- a/app/chain/message.py +++ b/app/chain/message.py @@ -925,17 +925,6 @@ class MessageChain(ChainBase): )) return - # 检查LLM配置 - if not settings.LLM_API_KEY: - self.post_message(Notification( - channel=channel, - source=source, - userid=userid, - username=username, - title="MoviePilot智能助未配置,请在系统设置中配置" - )) - return - # 提取用户消息 user_message = text[3:].strip() # 移除 "/ai" 前缀 if not user_message: