added stopgen

This commit is contained in:
Saifeddine ALOUI 2024-01-07 20:44:39 +01:00
parent 4ef9f5d72c
commit 310eafa0ab

View File

@ -299,3 +299,10 @@ def v1_instruct_generate(request_data: V1InstructGenerateRequest):
return output["text"]
else:
return None
@router.post("/stop_gen")
def stop_gen():
elf_server.cancel_gen = True
return {"status": True}