From 2a3992b6f11bf7e71817020416a6d376818bd12d Mon Sep 17 00:00:00 2001 From: yukavio <67678385+yukavio@users.noreply.github.com> Date: Mon, 18 Nov 2024 17:06:59 +0800 Subject: [PATCH] support set role as 'tool' (#2075) Co-authored-by: kavioyu --- python/sglang/srt/openai_api/protocol.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/sglang/srt/openai_api/protocol.py b/python/sglang/srt/openai_api/protocol.py index 3f15e229c..61b4df50a 100644 --- a/python/sglang/srt/openai_api/protocol.py +++ b/python/sglang/srt/openai_api/protocol.py @@ -236,7 +236,7 @@ ChatCompletionMessageContentPart = Union[ class ChatCompletionMessageGenericParam(BaseModel): - role: Literal["system", "assistant"] + role: Literal["system", "assistant", "tool"] content: Union[str, List[ChatCompletionMessageContentTextPart]]