We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bf5bebb commit 08ab62bCopy full SHA for 08ab62b
src/openai/lib/_parsing/_completions.py
@@ -157,7 +157,7 @@ def maybe_parse_content(
157
response_format: type[ResponseFormatT] | ResponseFormatParam | NotGiven,
158
message: ChatCompletionMessage | ParsedChatCompletionMessage[object],
159
) -> ResponseFormatT | None:
160
- if has_rich_response_format(response_format) and message.content is not None and not message.refusal:
+ if has_rich_response_format(response_format) and message.content and not message.refusal:
161
return _parse_content(response_format, message.content)
162
163
return None
0 commit comments