Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion examples/server/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,7 @@ struct server_task_result_cmpl_partial : server_task_result {
int32_t n_decoded;
int32_t n_prompt_tokens;

std::string stopping_word;
stop_type stop = STOP_TYPE_NONE;

std::vector<completion_token_output> probs_output;
Expand Down Expand Up @@ -586,6 +587,7 @@ struct server_task_result_cmpl_partial : server_task_result {
{"index", index},
{"content", content},
{"stop_type", stop_type_to_str(stop)},
{"stopping_word", stopping_word},
{"stop", is_stop},
{"id_slot", id_slot},
{"tokens_predicted", n_decoded},
Expand Down Expand Up @@ -1892,7 +1894,8 @@ struct server_context {
res->n_decoded = slot.n_decoded;
res->n_prompt_tokens = slot.n_prompt_tokens;

res->stop = slot.stop;
res->stopping_word = slot.stopping_word;
res->stop = slot.stop;

res->verbose = slot.params.verbose;
res->oaicompat = slot.params.oaicompat;
Expand Down
Loading