Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/openai/types/responses/response_input_item_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,10 @@ class ImageGenerationCall(TypedDict, total=False):
id: Required[str]
"""The unique ID of the image generation call."""

result: Required[Optional[str]]
result: Optional[str]
"""The generated image encoded in base64."""

status: Required[Literal["in_progress", "completed", "generating", "failed"]]
status: Literal["in_progress", "completed", "generating", "failed"]
"""The status of the image generation call."""

type: Required[Literal["image_generation_call"]]
Expand Down
4 changes: 2 additions & 2 deletions src/openai/types/responses/response_input_param.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,10 @@ class ImageGenerationCall(TypedDict, total=False):
id: Required[str]
"""The unique ID of the image generation call."""

result: Required[Optional[str]]
result: Optional[str]
"""The generated image encoded in base64."""

status: Required[Literal["in_progress", "completed", "generating", "failed"]]
status: Literal["in_progress", "completed", "generating", "failed"]
"""The status of the image generation call."""

type: Required[Literal["image_generation_call"]]
Expand Down
15 changes: 15 additions & 0 deletions tests/test_response_input_types.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from __future__ import annotations

from openai.types.responses import ResponseInputParam
from openai.types.responses.response_input_item_param import ImageGenerationCall


def test_image_generation_call_input_allows_id_only() -> None:
image_generation_call: ImageGenerationCall = {
"id": "ig_123",
"type": "image_generation_call",
}

response_input: ResponseInputParam = [image_generation_call]

assert response_input == [image_generation_call]