Make the prompt_id a uuid and return it when queueing the prompt.
This commit is contained in:
parent
3a7c3acc72
commit
974958ff81
|
@ -313,7 +313,9 @@ class PromptServer():
|
||||||
if "client_id" in json_data:
|
if "client_id" in json_data:
|
||||||
extra_data["client_id"] = json_data["client_id"]
|
extra_data["client_id"] = json_data["client_id"]
|
||||||
if valid[0]:
|
if valid[0]:
|
||||||
self.prompt_queue.put((number, id(prompt), prompt, extra_data, valid[2]))
|
prompt_id = str(uuid.uuid4())
|
||||||
|
self.prompt_queue.put((number, prompt_id, prompt, extra_data, valid[2]))
|
||||||
|
return web.json_response({"prompt_id": prompt_id})
|
||||||
else:
|
else:
|
||||||
resp_code = 400
|
resp_code = 400
|
||||||
out_string = valid[1]
|
out_string = valid[1]
|
||||||
|
|
Loading…
Reference in New Issue