Frontend language separate reasoning support (#6031)

This commit is contained in:
Yudi Xue
2025-06-10 17:11:29 -07:00
committed by GitHub
parent 90bd3e32d6
commit 14c18d25df
9 changed files with 822 additions and 1 deletions

View File

@@ -15,6 +15,7 @@ from sglang.lang.ir import (
SglRoleBegin,
SglRoleEnd,
SglSelect,
SglSeparateReasoning,
SglVideo,
)
@@ -277,3 +278,9 @@ def assistant_begin():
def assistant_end():
return SglRoleEnd("assistant")
def separate_reasoning(
expr: Optional[SglExpr] = None, model_type: Optional[str] = None
):
return SglExprList([expr, SglSeparateReasoning(model_type, expr=expr)])