"git@developer.sourcefind.cn:OpenDAS/megatron-lm.git" did not exist on "b07f1d0a60bc702873ba6f75263fc73099f3cb73"
Unverified Commit 9ba72530 authored by gongwei-130's avatar gongwei-130 Committed by GitHub
Browse files

accomendate reasoning_effort set in chat_template_kwargs (#9458)

parent 9c8e4f69
...@@ -87,6 +87,14 @@ class OpenAIServingChat(OpenAIServingBase): ...@@ -87,6 +87,14 @@ class OpenAIServingChat(OpenAIServingBase):
self, self,
request: ChatCompletionRequest, request: ChatCompletionRequest,
) -> tuple[GenerateReqInput, ChatCompletionRequest]: ) -> tuple[GenerateReqInput, ChatCompletionRequest]:
reasoning_effort = (
request.chat_template_kwargs.pop("reasoning_effort", None)
if request.chat_template_kwargs
else None
)
if reasoning_effort is not None:
request.reasoning_effort = reasoning_effort
"""Convert OpenAI chat completion request to internal format""" """Convert OpenAI chat completion request to internal format"""
is_multimodal = self.tokenizer_manager.model_config.is_multimodal is_multimodal = self.tokenizer_manager.model_config.is_multimodal
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment