[Frontend] Support CustomToolCall in the non-Harmony Responses API (#57322)
Signed-off-by: Shijin Zhang <75300765+Dovis01@users.noreply.github.com> Co-authored-by: Chauncey <chaunceyjiang@gmail.com>
This commit is contained in:
@@ -35,7 +35,7 @@ import json
|
||||
from collections.abc import Sequence
|
||||
|
||||
import regex as re
|
||||
from openai.types.responses import ToolChoiceFunction
|
||||
from openai.types.responses import ToolChoiceCustom, ToolChoiceFunction
|
||||
|
||||
from vllm.entrypoints.generate.base.protocol import (
|
||||
DeltaFunctionCall,
|
||||
@@ -149,7 +149,11 @@ class KimiK3ToolParser(ToolParser):
|
||||
) -> ChatCompletionRequest | ResponsesRequest:
|
||||
named = isinstance(
|
||||
request.tool_choice,
|
||||
(ChatCompletionNamedToolChoiceParam, ToolChoiceFunction),
|
||||
(
|
||||
ChatCompletionNamedToolChoiceParam,
|
||||
ToolChoiceFunction,
|
||||
ToolChoiceCustom,
|
||||
),
|
||||
)
|
||||
structured_outputs = getattr(request, "structured_outputs", None)
|
||||
has_structural_tag = (
|
||||
|
||||
Reference in New Issue
Block a user