From 067c9f3738581ded48ae66abf63af9257a092575 Mon Sep 17 00:00:00 2001 From: Kuba Birecki Date: Wed, 6 Mar 2024 12:25:47 +0100 Subject: [PATCH] Feat: allow custom prompt_id --- server.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/server.py b/server.py index d07d8531d9b..5d7272eaa95 100644 --- a/server.py +++ b/server.py @@ -519,6 +519,9 @@ async def post_prompt(request): extra_data["client_id"] = json_data["client_id"] if valid[0]: prompt_id = str(uuid.uuid4()) + if "prompt_id" in json_data: + prompt_id = json_data["prompt_id"] + outputs_to_execute = valid[2] self.prompt_queue.put( (number, prompt_id, prompt, extra_data, outputs_to_execute))