feat(deepseek): add independent DeepSeek bot module with dedicated config

Separate DeepSeek from ChatGPTBot into its own module (models/deepseek/) with dedicated deepseek_api_key and deepseek_api_base config fields, avoiding config conflicts when switching between providers. Backward compatible with old users who configured DeepSeek via open_ai_api_key/open_ai_api_base through automatic fallback.

Made-with: Cursor
This commit is contained in:
6vision
2026-03-23 21:23:35 +08:00
parent baf66a103d
commit f512b55ec2
7 changed files with 231 additions and 9 deletions

View File

@@ -17,7 +17,11 @@ def create_bot(bot_type):
from models.baidu.baidu_wenxin import BaiduWenxinBot
return BaiduWenxinBot()
elif bot_type in (const.OPENAI, const.CHATGPT, const.DEEPSEEK): # OpenAI-compatible API
elif bot_type == const.DEEPSEEK:
from models.deepseek.deepseek_bot import DeepSeekBot
return DeepSeekBot()
elif bot_type in (const.OPENAI, const.CHATGPT): # OpenAI-compatible API
from models.chatgpt.chat_gpt_bot import ChatGPTBot
return ChatGPTBot()