Fix bug where POST /infill doesn't work without prompt argument
Fixes https://github.com/ggerganov/llama.cpp/issues/4027
This commit is contained in:
parent
df9d1293de
commit
2927cca611
1 changed files with 1 additions and 1 deletions
|
@ -1510,7 +1510,7 @@ struct llama_server_context
|
|||
const bool has_prompt = slot.prompt.is_array() || (slot.prompt.is_string() && !slot.prompt.get<std::string>().empty()) || !slot.images.empty();
|
||||
|
||||
// empty prompt passed -> release the slot and send empty response
|
||||
if (slot.state == IDLE && slot.command == LOAD_PROMPT && !has_prompt)
|
||||
if (slot.state == IDLE && slot.command == LOAD_PROMPT && !has_prompt && !slot.infill)
|
||||
{
|
||||
slot.release();
|
||||
slot.print_timings();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue