You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SRV_ERR("task id = %d, error: %s\n", id_task, error.c_str());
2613
2627
2628
+
if (type == ERROR_TYPE_EXCEED_CONTEXT_SIZE) {
2629
+
GGML_ASSERT(n_ctx > 0 && n_prompt_tokens > 0);
2630
+
}
2631
+
2614
2632
auto res = std::make_unique<server_task_result_error>();
2615
-
res->id = id_task;
2616
-
res->err_type = type;
2617
-
res->err_msg = error;
2633
+
res->id = id_task;
2634
+
res->err_type = type;
2635
+
res->err_msg = error;
2636
+
res->n_prompt_tokens = n_prompt_tokens;
2637
+
res->n_ctx = n_ctx;
2618
2638
2619
2639
queue_results.send(std::move(res));
2620
2640
}
@@ -3286,7 +3306,7 @@ struct server_context {
3286
3306
3287
3307
if (slot.n_prompt_tokens > slot.n_ctx) {
3288
3308
slot.release();
3289
-
send_error(slot, "input is larger than the max context size. skipping", ERROR_TYPE_SERVER);
3309
+
send_error(slot, "input is larger than the max context size. skipping", ERROR_TYPE_EXCEED_CONTEXT_SIZE);
3290
3310
continue;
3291
3311
}
3292
3312
} else {
@@ -3296,7 +3316,7 @@ struct server_context {
3296
3316
// context shift should be applied only during the generation phase
3297
3317
if (slot.n_prompt_tokens >= slot.n_ctx) {
3298
3318
slot.release();
3299
-
send_error(slot, "the request exceeds the available context size. try increasing the context size or enable context shift", ERROR_TYPE_INVALID_REQUEST);
3319
+
send_error(slot, "the request exceeds the available context size. try increasing the context size or enable context shift", ERROR_TYPE_EXCEED_CONTEXT_SIZE);
0 commit comments