Skip to content

Commit 34b2a5e

Browse files
committed
server : do not release slot on image input (#3798)
1 parent 6961c4b commit 34b2a5e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/server/server.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1502,7 +1502,7 @@ struct llama_server_context
15021502
{
15031503
for (auto & slot : slots)
15041504
{
1505-
const bool has_prompt = slot.prompt.is_array() || (slot.prompt.is_string() && !slot.prompt.get<std::string>().empty());
1505+
const bool has_prompt = slot.prompt.is_array() || (slot.prompt.is_string() && !slot.prompt.get<std::string>().empty()) || !slot.images.empty();
15061506

15071507
// empty prompt passed -> release the slot and send empty response
15081508
if (slot.state == IDLE && slot.command == LOAD_PROMPT && !has_prompt)

0 commit comments

Comments
 (0)