server : add "tokens" output
ggml-ci
This commit is contained in:
parent
152610eda9
commit
89eaf5036a
1 changed files with 2 additions and 2 deletions
|
@ -687,8 +687,6 @@ struct server_task_result_cmpl_partial : server_task_result {
|
|||
json second_ret = json{
|
||||
{"choices", json::array({json{{"finish_reason", nullptr},
|
||||
{"index", 0},
|
||||
{"delta", json {
|
||||
{"content", content}}}
|
||||
}})},
|
||||
{"created", t},
|
||||
{"id", oaicompat_cmpl_id},
|
||||
|
@ -704,6 +702,7 @@ struct server_task_result_cmpl_partial : server_task_result {
|
|||
{"delta",
|
||||
json {
|
||||
{"content", content},
|
||||
{"tokens", tokens}
|
||||
}},
|
||||
}});
|
||||
}
|
||||
|
@ -1017,6 +1016,7 @@ struct server_slot {
|
|||
n_prompt_tokens = 0;
|
||||
last_nl_pos = 0;
|
||||
generated_text = "";
|
||||
generated_tokens = {};
|
||||
has_new_line = false;
|
||||
truncated = false;
|
||||
stop = STOP_TYPE_NONE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue