server: return_progress to also report 0% processing state (#18305)
This commit is contained in:
parent
5b6c9bc0f3
commit
5ee4e43f26
2 changed files with 17 additions and 2 deletions
|
|
@ -2313,6 +2313,12 @@ private:
|
|||
slot.n_prompt_tokens_processed = 0;
|
||||
|
||||
slot.prompt.tokens.keep_first(n_past);
|
||||
|
||||
// send initial 0% progress update if needed
|
||||
// this is to signal the client that the request has started processing
|
||||
if (slot.task->params.stream && slot.task->params.return_progress) {
|
||||
send_partial_response(slot, {}, true);
|
||||
}
|
||||
}
|
||||
|
||||
if (!slot.can_split()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue