Skip to content

Commit 31bee6a

Browse files
committed
feat: remove think for reason model
1 parent a452912 commit 31bee6a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/memos/llms/vllm.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ def _generate_with_api_client(self, messages: list[MessageDict]) -> str:
105105
"temperature": float(getattr(self.config, "temperature", 0.8)),
106106
"max_tokens": int(getattr(self.config, "max_tokens", 1024)),
107107
"top_p": float(getattr(self.config, "top_p", 0.9)),
108+
"extra_body": {"chat_template_kwargs": {"enable_thinking": False}},
108109
}
109110

110111
response = self.client.chat.completions.create(**completion_kwargs)
@@ -142,6 +143,7 @@ def generate_stream(self, messages: list[MessageDict]):
142143
"max_tokens": int(getattr(self.config, "max_tokens", 1024)),
143144
"top_p": float(getattr(self.config, "top_p", 0.9)),
144145
"stream": True, # Enable streaming
146+
"extra_body": {"chat_template_kwargs": {"enable_thinking": False}},
145147
}
146148

147149
stream = self.client.chat.completions.create(**completion_kwargs)

0 commit comments

Comments
 (0)