1
mirror of https://github.com/comfyanonymous/ComfyUI.git synced 2025-08-02 23:14:49 +08:00

Add a /history/{prompt_id} endpoint.

This commit is contained in:
comfyanonymous
2023-06-12 14:34:30 -04:00
parent 67833c83d8
commit af91df85c2
2 changed files with 12 additions and 2 deletions

View File

@@ -372,6 +372,11 @@ class PromptServer():
async def get_history(request):
return web.json_response(self.prompt_queue.get_history())
@routes.get("/history/{prompt_id}")
async def get_history(request):
prompt_id = request.match_info.get("prompt_id", None)
return web.json_response(self.prompt_queue.get_history(prompt_id=prompt_id))
@routes.get("/queue")
async def get_queue(request):
queue_info = {}