Skip to content

Commit 8a136c2

Browse files
fix(api): allow original image detail in Chat Completions (#4005)
## Summary Allow original as an image detail value in Chat Completions requests. ## Changes - Add original to the accepted image_url.detail values for Chat Completions. Existing values and the auto default are unchanged. Co-authored-by: marcuswood-oai <323319819+marcuswood-oai@users.noreply.github.com>
1 parent 28c5c9a commit 8a136c2

4 files changed

Lines changed: 9 additions & 8 deletions

File tree

‎.castiron.stats.yml‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
schema_version: 1
2-
generation_id: 81dce864-c2f8-471a-bad1-920fb15d5bb5
3-
openapi_spec_hash: cd9543e60ee28b5d293254a0b5282660
4-
openapi_transformed_spec_hash: 386ef9ea8125a05cc4d27c468d63d7b0
2+
generation_id: 862285b0-bba7-4d7b-934b-63759482d34f
3+
openapi_spec_hash: c829925be8009e5eaedbc7e25a75bbb4
4+
openapi_transformed_spec_hash: 06558c212f804512d9bbd22d9162355c
55
config_hash: 75548929fa5c67ad9d1d94b5a30a56e9
6-
codegen_sha: 07d3896bc286db9ec752cdf794ec7de9b23d5a4b
7-
codegen_hash: 87dfcc2b5ddd2c4f81e744a2657ce932beeab29c4094265aabeeb30f09221812
8-
public_codegen_sha: 5cf146cf8627f78daddf771d288f511e34c7ed48
6+
codegen_sha: cad107aa3bd1d80294233ba5cad18f0db8151a23
7+
codegen_hash: 256f429bb05c452738ab7d660f8cf6c2ed641e0b5e9d7e9a9f21c6c1a24bf818
8+
public_codegen_sha: 8fdc56a6031ebe1660d2a10292b8db826b2b02b0

‎api_reference/openapi.transformed.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38702,6 +38702,7 @@ components:
3870238702
- auto
3870338703
- low
3870438704
- high
38705+
- original
3870538706
default: auto
3870638707
required:
3870738708
- url

‎src/openai/types/chat/chat_completion_content_part_image.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class ImageURL(BaseModel):
1212
url: str
1313
"""Either a URL of the image or the base64 encoded image data."""
1414

15-
detail: Optional[Literal["auto", "low", "high"]] = None
15+
detail: Optional[Literal["auto", "low", "high", "original"]] = None
1616
"""Specifies the detail level of the image.
1717
1818
Learn more in the

‎src/openai/types/chat/chat_completion_content_part_image_param.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class ImageURL(TypedDict, total=False):
1111
url: Required[str]
1212
"""Either a URL of the image or the base64 encoded image data."""
1313

14-
detail: Literal["auto", "low", "high"]
14+
detail: Literal["auto", "low", "high", "original"]
1515
"""Specifies the detail level of the image.
1616
1717
Learn more in the

0 commit comments

Comments
 (0)