You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Confirm this is an issue with the Python library and not an underlying OpenAI API
This is an issue with the Python library
Describe the bug
In the APIError class, there is a body class variable. Based on the comment:
""The API response body.
If the API responded with a valid JSON structure then this property will be the
decoded result.
If it isn't a valid JSON structure then this will be the raw response.
If there was no response associated with this error then it will be `None`.
"""
This class variable should contain the body of the response. However in the __init__ function, the body variable is not assigned and kept.
To Reproduce
Simply error.body will result in:
AttributeError: 'XxxxxxError' object has no attribute 'body'
Code snippets
No response
OS
OS agnostic
Python version
Python version agnostic
Library version
Lib version agnostic
The text was updated successfully, but these errors were encountered:
Confirm this is an issue with the Python library and not an underlying OpenAI API
Describe the bug
In the
APIError
class, there is abody
class variable. Based on the comment:This class variable should contain the body of the response. However in the
__init__
function, thebody
variable is not assigned and kept.To Reproduce
Simply
error.body
will result in:Code snippets
No response
OS
OS agnostic
Python version
Python version agnostic
Library version
Lib version agnostic
The text was updated successfully, but these errors were encountered: