diff --git a/src/blackbox/chat.py b/src/blackbox/chat.py index e62beb5..e505176 100644 --- a/src/blackbox/chat.py +++ b/src/blackbox/chat.py @@ -63,6 +63,7 @@ class Chat(Blackbox): user_prompt_template = settings.get('user_prompt_template') user_stream = settings.get('stream') user_websearch = settings.get('websearch') + user_thinking = settings.get('thinking', False) llm_model = "llm" @@ -249,6 +250,7 @@ class Chat(Blackbox): "presence_penalty": str(user_presence_penalty), "stop": str(user_stop), "stream": user_stream, + "chat_template_kwargs": {"enable_thinking": user_thinking}, } else: chat_inputs={ @@ -267,6 +269,7 @@ class Chat(Blackbox): "presence_penalty":float( user_presence_penalty), # "stop": user_stop, "stream": user_stream, + "chat_template_kwargs": {"enable_thinking": user_thinking}, } # # 获取当前时间戳