forked from openai/openai-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathimage.py
More file actions
28 lines (19 loc) · 872 Bytes
/
Copy pathimage.py
File metadata and controls
28 lines (19 loc) · 872 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
from typing import Optional
from .._models import BaseModel
__all__ = ["Image"]
class Image(BaseModel):
"""Represents the content or the URL of an image generated by the OpenAI API."""
b64_json: Optional[str] = None
"""The base64-encoded JSON of the generated image.
Returned by default for the GPT image models, and only present if
`response_format` is set to `b64_json` for `dall-e-2` and `dall-e-3`.
"""
revised_prompt: Optional[str] = None
"""For `dall-e-3` only, the revised prompt that was used to generate the image."""
url: Optional[str] = None
"""
When using `dall-e-2` or `dall-e-3`, the URL of the generated image if
`response_format` is set to `url` (default value). Unsupported for the GPT image
models.
"""