You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tools/server/tests/unit/test_chat_completion.py
+23Lines changed: 23 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -132,6 +132,28 @@ def test_chat_template():
132
132
assertres.body["__verbose"]["prompt"] =="<s> <|start_header_id|>system<|end_header_id|>\n\nBook<|eot_id|><|start_header_id|>user<|end_header_id|>\n\nWhat is the best book<|eot_id|><|start_header_id|>assistant<|end_header_id|>\n\n"
{"role": "user", "content": "What is the best book"},
149
+
{"role": "assistant", "content": prefill},
150
+
]
151
+
})
152
+
assertres.status_code==200
153
+
assert"__verbose"inres.body
154
+
assertres.body["__verbose"]["prompt"] ==f"<s> <|start_header_id|>system<|end_header_id|>\n\nBook<|eot_id|><|start_header_id|>user<|end_header_id|>\n\nWhat is the best book<|eot_id|><|start_header_id|>assistant<|end_header_id|>\n\n{re_prefill}"
0 commit comments