server: support cancellation of prompt processing

This commit is contained in:
ochafik 2024-10-04 13:22:57 +01:00
parent 42f546500f
commit 03efb92fde

View file

@ -1877,6 +1877,13 @@ struct server_context {
system_prompt_update();
}
for (auto & slot : slots) {
if (slot.is_processing() && slot.is_alive && !slot.is_alive()) {
SLT_WRN(slot, "%s", "slot connection died\n");
slot.release();
}
}
// check if all slots are idle
{
bool all_idle = true;