From aa83574c990ae0c344efda2d58058723a8408c1e Mon Sep 17 00:00:00 2001 From: tom Date: Mon, 23 Jun 2025 16:45:05 +0800 Subject: [PATCH] feat: add enable thinking --- src/blackbox/chat.py | 3 +++ 1 file changed, 3 insertions(+) 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}, } # # 获取当前时间戳