I have all unit tests pass and I can see the output of revised_draft. But I fail and get a 0% on section 3.
All tests passed!
I see this error,
Failed test case: revise_draft raised AttributeError: ‘NoneType’ object has no attribute ‘choices’. Expected: no exception, but got: ‘NoneType’ object has no attribute ‘choices’.
I did a debug print and can see response.choices[0].message.content
Avoid using global variables unless you absolutely have to. The grader tests your code in an isolated environment without running all cells from the top. As a result, global variables may be unavailable when scoring your submission. Global variables that are meant to be used will be defined in UPPERCASE.
Thanks for the assist, I was able to figure it out with your hint. Thank you.