Skip to content

Commit

Permalink
Update main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
nicola-corbellini authored Mar 8, 2024
1 parent b11ad1a commit 41cd716
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ class Model(Enum):
dalle2: str = 'dall-e-2'

class Settings(BaseModel):
api_key: str = Field(title="API Key", description="The API key for OpenAI's image generation API.", default=""),
image_size: ImageSize = Field(title="Image size", description="The size for the image to generate. For dall-e-3 you can choose between '1024x1024', '1792x1024' and '1024x1792' while for dall-e-2 you can choose between '1024x1024', '512x512' and '256x256'", default=ImageSize.quad),
quality: Quality = Field(title="Image quality", description="The quality for the image to generate. It will be used only with dall-e-3", default=Quality.hd),
style: Style = Field(title="Image style", description="The style for the image to generate. It will be used only with dall-e-3", default=Style.natural),
api_key: str = Field(title="API Key", description="The API key for OpenAI's image generation API.", default="")
image_size: ImageSize = Field(title="Image size", description="The size for the image to generate. For dall-e-3 you can choose between '1024x1024', '1792x1024' and '1024x1792' while for dall-e-2 you can choose between '1024x1024', '512x512' and '256x256'", default=ImageSize.quad)
quality: Quality = Field(title="Image quality", description="The quality for the image to generate. It will be used only with dall-e-3", default=Quality.hd)
style: Style = Field(title="Image style", description="The style for the image to generate. It will be used only with dall-e-3", default=Style.natural)
model: Model = Field(title="Model", description="The model to use for the image to generate", default=Model.dalle3)

@model_validator(mode='after')
Expand Down

0 comments on commit 41cd716

Please sign in to comment.