server : return stopping_word in the partial response
This commit is contained in:
parent
ecc93d0558
commit
c06405e10d
1 changed files with 4 additions and 1 deletions
|
@ -556,6 +556,7 @@ struct server_task_result_cmpl_partial : server_task_result {
|
||||||
int32_t n_decoded;
|
int32_t n_decoded;
|
||||||
int32_t n_prompt_tokens;
|
int32_t n_prompt_tokens;
|
||||||
|
|
||||||
|
std::string stopping_word;
|
||||||
stop_type stop = STOP_TYPE_NONE;
|
stop_type stop = STOP_TYPE_NONE;
|
||||||
|
|
||||||
std::vector<completion_token_output> probs_output;
|
std::vector<completion_token_output> probs_output;
|
||||||
|
@ -586,6 +587,7 @@ struct server_task_result_cmpl_partial : server_task_result {
|
||||||
{"index", index},
|
{"index", index},
|
||||||
{"content", content},
|
{"content", content},
|
||||||
{"stop_type", stop_type_to_str(stop)},
|
{"stop_type", stop_type_to_str(stop)},
|
||||||
|
{"stopping_word", stopping_word},
|
||||||
{"stop", is_stop},
|
{"stop", is_stop},
|
||||||
{"id_slot", id_slot},
|
{"id_slot", id_slot},
|
||||||
{"tokens_predicted", n_decoded},
|
{"tokens_predicted", n_decoded},
|
||||||
|
@ -1892,6 +1894,7 @@ struct server_context {
|
||||||
res->n_decoded = slot.n_decoded;
|
res->n_decoded = slot.n_decoded;
|
||||||
res->n_prompt_tokens = slot.n_prompt_tokens;
|
res->n_prompt_tokens = slot.n_prompt_tokens;
|
||||||
|
|
||||||
|
res->stopping_word = slot.stopping_word;
|
||||||
res->stop = slot.stop;
|
res->stop = slot.stop;
|
||||||
|
|
||||||
res->verbose = slot.params.verbose;
|
res->verbose = slot.params.verbose;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue