server : fix rebase artifacts

This commit is contained in:
Georgi Gerganov 2024-12-18 14:10:59 +02:00
parent edb7896b49
commit 2a1a6f6326
No known key found for this signature in database
GPG key ID: 449E073F9DC10735
2 changed files with 2 additions and 6 deletions

View file

@ -687,6 +687,8 @@ 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},
@ -702,7 +704,6 @@ struct server_task_result_cmpl_partial : server_task_result {
{"delta",
json {
{"content", content},
{"tokens", tokens}
}},
}});
}
@ -1016,7 +1017,6 @@ 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;

View file

@ -92,10 +92,6 @@ def test_embedding_pooling_none():
for x in res.body[0]['embedding']:
assert abs(sum([x ** 2 for x in x]) - 1) > EPSILON
# make sure embedding vector is not normalized
for x in res.body[0]['embedding']:
assert abs(sum([x ** 2 for x in x]) - 1) > EPSILON
def test_embedding_pooling_none_oai():
global server