mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-05-02 14:18:00 +08:00
[Frontend] add tools for dsv32 developer role (#30040)
Signed-off-by: pridejcyang <pridejcyang@tencent.com> Co-authored-by: pridejcyang <pridejcyang@tencent.com> Co-authored-by: Jee Jee Li <pandaleefree@gmail.com>
This commit is contained in:
parent
d0502b4928
commit
855b101d75
@ -24,6 +24,7 @@ from openai.types.chat import (
|
|||||||
ChatCompletionContentPartInputAudioParam,
|
ChatCompletionContentPartInputAudioParam,
|
||||||
ChatCompletionContentPartRefusalParam,
|
ChatCompletionContentPartRefusalParam,
|
||||||
ChatCompletionContentPartTextParam,
|
ChatCompletionContentPartTextParam,
|
||||||
|
ChatCompletionFunctionToolParam,
|
||||||
ChatCompletionMessageToolCallParam,
|
ChatCompletionMessageToolCallParam,
|
||||||
ChatCompletionToolMessageParam,
|
ChatCompletionToolMessageParam,
|
||||||
)
|
)
|
||||||
@ -269,6 +270,9 @@ class CustomChatCompletionMessageParam(TypedDict, total=False):
|
|||||||
reasoning: str | None
|
reasoning: str | None
|
||||||
"""The reasoning content for interleaved thinking."""
|
"""The reasoning content for interleaved thinking."""
|
||||||
|
|
||||||
|
tools: list[ChatCompletionFunctionToolParam] | None
|
||||||
|
"""The tools for developer role."""
|
||||||
|
|
||||||
|
|
||||||
ChatCompletionMessageParam: TypeAlias = (
|
ChatCompletionMessageParam: TypeAlias = (
|
||||||
OpenAIChatCompletionMessageParam
|
OpenAIChatCompletionMessageParam
|
||||||
@ -300,6 +304,9 @@ class ConversationMessage(TypedDict, total=False):
|
|||||||
reasoning_content: str | None
|
reasoning_content: str | None
|
||||||
"""Deprecated: The reasoning content for interleaved thinking."""
|
"""Deprecated: The reasoning content for interleaved thinking."""
|
||||||
|
|
||||||
|
tools: list[ChatCompletionFunctionToolParam] | None
|
||||||
|
"""The tools for developer role."""
|
||||||
|
|
||||||
|
|
||||||
# Passed in by user
|
# Passed in by user
|
||||||
ChatTemplateContentFormatOption = Literal["auto", "string", "openai"]
|
ChatTemplateContentFormatOption = Literal["auto", "string", "openai"]
|
||||||
@ -1619,6 +1626,8 @@ def _parse_chat_message_content(
|
|||||||
if "name" in message and isinstance(message["name"], str):
|
if "name" in message and isinstance(message["name"], str):
|
||||||
result_msg["name"] = message["name"]
|
result_msg["name"] = message["name"]
|
||||||
|
|
||||||
|
if role == "developer":
|
||||||
|
result_msg["tools"] = message.get("tools", None)
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user