aboutsummaryrefslogtreecommitdiff
path: root/modules/api/models.py
diff options
context:
space:
mode:
authorevshiron <evshiron@gmail.com>2022-10-30 03:55:43 +0800
committerevshiron <evshiron@gmail.com>2022-10-30 03:56:44 +0800
commitf62db4d5c753bc32d2ae166606ce41f4c5fa5c43 (patch)
tree974da3bf418c2b36f2a66c88b9b5c0d59938f618 /modules/api/models.py
parent7f5212fb5f96092058da4a6f58b1a9037565a00f (diff)
fix progress response model
Diffstat (limited to 'modules/api/models.py')
-rw-r--r--modules/api/models.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/api/models.py b/modules/api/models.py
index 8d4abc39..e1762fb9 100644
--- a/modules/api/models.py
+++ b/modules/api/models.py
@@ -1,6 +1,6 @@
import inspect
from click import prompt
-from pydantic import BaseModel, Field, create_model
+from pydantic import BaseModel, Field, Json, create_model
from typing import Any, Optional
from typing_extensions import Literal
from inflection import underscore
@@ -158,6 +158,6 @@ class PNGInfoResponse(BaseModel):
info: str = Field(title="Image info", description="A string with all the info the image had")
class ProgressResponse(BaseModel):
- progress: float
- eta_relative: float
- state: dict
+ progress: float = Field(title="Progress", description="The progress with a range of 0 to 1")
+ eta_relative: float = Field(title="ETA in secs")
+ state: Json