Skip to content

Commit 8a3679c

Browse files
Updating class prototype.
1 parent d3ba255 commit 8a3679c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

jigsawstack/image_generation.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
from typing import Any, Dict, List, Union, cast
2-
from typing_extensions import NotRequired, TypedDict, Literal
2+
from typing_extensions import NotRequired, TypedDict, Literal, Required
33
from .request import Request, RequestConfig
44
from .async_request import AsyncRequest
55

66
from typing import List, Union
77
from ._config import ClientConfig
88

9-
class ImageGenerationparams(TypedDict):
10-
prompt: str
9+
class ImageGenerationParams(TypedDict):
10+
prompt: Required[str]
1111
""""
1212
The text to generate the image from."
1313
"""
14-
aspect_ratio: Literal["1:1", "16:9", "21:9", "3:2", "2:3", "4:5", "5:4", "3:4", "4:3", "9:16", "9:21"]
14+
aspect_ratio: NotRequired[Literal["1:1", "16:9", "21:9", "3:2", "2:3", "4:5", "5:4", "3:4", "4:3", "9:16", "9:21"]]
1515
"""
1616
The aspect ratio of the image. The default is 1:1.
1717
"""
@@ -62,7 +62,7 @@ def __init__(
6262
disable_request_logging=disable_request_logging,
6363
)
6464

65-
def image_generation(self, params: ImageGenerationparams) -> ImageGenerationResponse:
65+
def image_generation(self, params: ImageGenerationParams) -> ImageGenerationResponse:
6666
path = "/ai/image_generation"
6767
resp = Request(
6868
config=self.config,
@@ -88,7 +88,7 @@ def __init__(
8888
disable_request_logging=disable_request_logging,
8989
)
9090

91-
async def image_generation(self, params: ImageGenerationparams) -> ImageGenerationResponse:
91+
async def image_generation(self, params: ImageGenerationParams) -> ImageGenerationResponse:
9292
path = "/ai/image_generation"
9393
resp = await AsyncRequest(
9494
config=self.config,

0 commit comments

Comments
 (0)