update:检验LLM密钥

This commit is contained in:
hrz
2025-04-24 15:22:28 +08:00
parent b0b4f87848
commit 7e4ada5f4b
5 changed files with 30 additions and 17 deletions
@@ -2,6 +2,7 @@ from config.logger import setup_logging
from http import HTTPStatus
from dashscope import Application
from core.providers.llm.base import LLMProviderBase
from core.utils.util import check_model_key
TAG = __name__
logger = setup_logging()
@@ -14,6 +15,7 @@ class LLMProvider(LLMProviderBase):
self.base_url = config.get("base_url")
self.is_No_prompt = config.get("is_no_prompt")
self.memory_id = config.get("ali_memory_id")
check_model_key("AliBLLLM", self.api_key)
def response(self, session_id, dialogue):
try: