Skip to content

Commit 0f2e045

Browse files
[Misc] Fix chat input string in xgrammar format
Signed-off-by: lvfei.lv <lvfei.lv@alibaba-inc.com>
1 parent 8e5314a commit 0f2e045

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/tool_use/utils.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,11 @@ def ensure_system_prompt(messages: list[dict[str, Any]],
187187
"unit": {
188188
"type": "string",
189189
"description": "The unit to fetch the temperature in",
190-
"enum": ["celsius", "fahrenheit"]
190+
"oneOf": [{
191+
"const": "celsius"
192+
}, {
193+
"const": "fahrenheit"
194+
}]
191195
}
192196
}
193197
}

0 commit comments

Comments
 (0)