mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-07-20 13:47:15 +08:00
feat: qwen model modify
This commit is contained in:
@@ -44,7 +44,7 @@ def create_bot(bot_type):
|
||||
from bot.claude.claude_ai_bot import ClaudeAIBot
|
||||
return ClaudeAIBot()
|
||||
|
||||
elif bot_type == const.TONGYI:
|
||||
elif bot_type == const.QWEN:
|
||||
from bot.tongyi.tongyi_qwen_bot import TongyiQwenBot
|
||||
return TongyiQwenBot()
|
||||
raise RuntimeError
|
||||
|
||||
@@ -20,14 +20,14 @@ from config import conf, load_config
|
||||
class TongyiQwenBot(Bot):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.access_key_id = conf().get("tongyi_access_key_id")
|
||||
self.access_key_secret = conf().get("tongyi_access_key_secret")
|
||||
self.agent_key = conf().get("tongyi_agent_key")
|
||||
self.app_id = conf().get("tongyi_app_id")
|
||||
self.node_id = conf().get("tongyi_node_id")
|
||||
self.access_key_id = conf().get("qwen_access_key_id")
|
||||
self.access_key_secret = conf().get("qwen_access_key_secret")
|
||||
self.agent_key = conf().get("qwen_agent_key")
|
||||
self.app_id = conf().get("qwen_app_id")
|
||||
self.node_id = conf().get("qwen_node_id") or ""
|
||||
self.api_key_client = broadscope_bailian.AccessTokenClient(access_key_id=self.access_key_id, access_key_secret=self.access_key_secret)
|
||||
self.api_key_expired_time = self.set_api_key()
|
||||
self.sessions = SessionManager(BaiduWenxinSession, model=conf().get("model") or "tongyi")
|
||||
self.sessions = SessionManager(BaiduWenxinSession, model=conf().get("model") or "qwen")
|
||||
self.temperature = conf().get("temperature", 0.2) # 值在[0,1]之间,越大表示回复越具有不确定性
|
||||
self.top_p = conf().get("top_p", 1)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user