clarify a bit

This commit is contained in:
Xuan Son Nguyen 2024-12-08 17:32:08 +01:00
parent d893770ba4
commit 270c5d6529
2 changed files with 2 additions and 1 deletions

View file

@ -392,7 +392,7 @@ struct server_task_result {
return false;
}
virtual bool is_stop() {
// only used by server_task_result_cmpl_final
// only used by server_task_result_cmpl_*
return false;
}
virtual int get_index() {

View file

@ -42,6 +42,7 @@ def test_completion_stream(prompt: str, n_predict: int, re_content: str, n_promp
})
content = ""
for data in res:
assert "stop" in data and type(data["stop"]) == bool
if data["stop"]:
assert data["timings"]["prompt_n"] == n_prompt
assert data["timings"]["predicted_n"] == n_predicted