Skip to content

Commit

Permalink
Feat: allow custom prompt_id
Browse files Browse the repository at this point in the history
  • Loading branch information
KubaBir committed Mar 6, 2024
1 parent 7bc9086 commit 067c9f3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 067c9f3

Please sign in to comment.