Skip to content

Commit b2ed180

Browse files
lukemetzdavedittrich
authored andcommitted
Fix grabbing value out of header (openai#388)
1 parent 1b60185 commit b2ed180

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)