Commit ff8d5cf1

Luke <luke.s.metz@gmail.com>
2023-04-10 23:37:26
Fix grabbing value out of header (#388)
1 parent aa133ce
Changed files (1)
openai/api_requestor.py
@@ -667,7 +667,7 @@ class APIRequestor:
                 headers=rheaders,
             )
         try:
-            if 'text/plain' in rheaders.get('Content-Type'):
+            if 'text/plain' in rheaders.get('Content-Type', ''):
                 data = rbody
             else:
                 data = json.loads(rbody)