For the M2 Graded lab - I am getting this error for exercise 3: Failed test case: revise_draft raised AttributeError: ‘NoneType’ object has no attribute ‘choices’.
Expected:
no exception,
but got:
‘NoneType’ object has no attribute ‘choices’.
However, when I print the response, I see the choices attribute
Response: ChatCompletion(id=‘chatcmpl-EXmjZdadkz2ZenK9biYfu4MNdoCn0’, choices=[Choice(finish_reason=‘stop’, index=0, logprobs=None, message=ChatCompletionMessage(content=‘To provide a meaningful improvement to your essay, please include both the original draft and the reflection feedback. This will allow me to assist you in enhancing your essay effectively based on the feedback given.’, refusal=None, role=‘assistant’, annotations=[], audio=None, function_call=None, tool_calls=None))], created=1791720865, model=‘gpt-4o-2024-08-06’, object=‘chat.completion’, service_tier=‘default’, system_fingerprint=‘fp_2a68371a58’, usage=CompletionUsage(completion_tokens=38, prompt_tokens=85, total_tokens=123, completion_tokens_details=CompletionTokensDetails(accepted_prediction_tokens=0, audio_tokens=0, reasoning_tokens=0, rejected_prediction_tokens=0), prompt_tokens_details=PromptTokensDetails(audio_tokens=0, cached_tokens=0)))
What is the reason for the error in the assignement?
