server : properly handle null llama_context (#25868)
Co-authored-by: Stanisław Szymczyk <sszymczy@gmail.com>
This commit is contained in:
co-authored by
Stanisław Szymczyk
parent
f048010180
commit
40b740ad05
@@ -1152,6 +1152,11 @@ private:
|
||||
return false;
|
||||
}
|
||||
|
||||
if (ctx_tgt == nullptr) {
|
||||
SRV_ERR("failed to create_context with model '%s'\n", params_base.model.path.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
vocab = llama_model_get_vocab(model_tgt);
|
||||
|
||||
n_ctx = llama_n_ctx(ctx_tgt);
|
||||
|
||||
Reference in New Issue
Block a user