If you are seeing this error:
openaihas noChatCompletionattribute, this is likely due to an old version of the openai package. Try upgrading it withpip install --upgrade openai. (type=value_error)
Then change your requirements to have this version of openai
openai==0.27.8
I tried using the current version and still got the error. Falling back to an older version solved it.