Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e2d25ef

Browse files
fix(api): fix nullability of logprobs
Makes ResponseOutputText.logprobs nullable, matching with 2.6.1. While this is always present in the server response, this inadvertently affected params and some constructors
1 parent c82714c commit e2d25ef

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 136
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-3c5d1593d7c6f2b38a7d78d7906041465ee9d6e9022f0651e1da194654488108.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-eeba8addf3a5f412e5ce8d22031e60c61650cee3f5d9e587a2533f6818a249ea.yml
33
openapi_spec_hash: 0a4d8ad2469823ce24a3fd94f23f1c2b
4-
config_hash: 032995825500a503a76da119f5354905
4+
config_hash: 0bb1941a78ece0b610a2fbba7d74a84c

src/openai/types/responses/response_output_text.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3-
from typing import List, Union
3+
from typing import List, Union, Optional
44
from typing_extensions import Literal, Annotated, TypeAlias
55

66
from ..._utils import PropertyInfo
@@ -108,10 +108,10 @@ class ResponseOutputText(BaseModel):
108108
annotations: List[Annotation]
109109
"""The annotations of the text output."""
110110

111-
logprobs: List[Logprob]
112-
113111
text: str
114112
"""The text output from the model."""
115113

116114
type: Literal["output_text"]
117115
"""The type of the output text. Always `output_text`."""
116+
117+
logprobs: Optional[List[Logprob]] = None

src/openai/types/responses/response_output_text_param.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,10 @@ class ResponseOutputTextParam(TypedDict, total=False):
106106
annotations: Required[Iterable[Annotation]]
107107
"""The annotations of the text output."""
108108

109-
logprobs: Required[Iterable[Logprob]]
110-
111109
text: Required[str]
112110
"""The text output from the model."""
113111

114112
type: Required[Literal["output_text"]]
115113
"""The type of the output text. Always `output_text`."""
114+
115+
logprobs: Iterable[Logprob]

0 commit comments

Comments
 (0)