"tests/entrypoints/pooling/openai/test_embedding.py" did not exist on "7bd4c37ae7c6f2223c1a031bbdd2e3435d53da94"
Unverified Commit 941e52c2 authored by Wentao Ye's avatar Wentao Ye Committed by GitHub
Browse files

[Refactor] Simplify `chat_completion_full_generator` for tool parsers (#35634)


Signed-off-by: default avataryewentao256 <zhyanwentao@126.com>
parent be292b7c
......@@ -1463,17 +1463,7 @@ class OpenAIServingChat(OpenAIServing):
tool_call_class = (
MistralToolCall if is_mistral_tokenizer(tokenizer) else ToolCall
)
if self.use_harmony:
# Harmony models already have parsed content and tool_calls
# through parse_chat_output. Respect its output directly.
message = ChatMessage(
role=role,
reasoning=reasoning,
content=content,
tool_calls=tool_calls if tool_calls else [],
)
elif (not self.enable_auto_tools or not self.tool_parser) and (
if (not self.enable_auto_tools or not self.tool_parser) and (
not isinstance(request.tool_choice, ChatCompletionNamedToolChoiceParam)
and request.tool_choice != "required"
):
......
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