Skip to content

Commit ff8d5cf

Browse files
authored
Fix grabbing value out of header (#388)
1 parent aa133ce commit ff8d5cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

openai/api_requestor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ def _interpret_response_line(
667667
headers=rheaders,
668668
)
669669
try:
670-
if 'text/plain' in rheaders.get('Content-Type'):
670+
if 'text/plain' in rheaders.get('Content-Type', ''):
671671
data = rbody
672672
else:
673673
data = json.loads(rbody)

0 commit comments

Comments
 (0)