The reference code for GPT3.5 does not work using openai.ChatCompletion.create(...) function

Pari Rajaram 5 Reputation points
2023-04-11T14:09:43.3+00:00

We don't have openai.ChatCompletion in our openai installs. Is there a special version of openai client that we need to get?

response = openai.ChatCompletion.create(
10  engine="gpt35",

response = openai.ChatCompletion.create( AttributeError: module 'openai' has no attribute 'ChatCompletion'

Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
2,644 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Pari Rajaram 5 Reputation points
    2023-04-18T18:51:14.69+00:00

    I had openai 0.26.5 python client on my mac. I updated it with version openai-0.27.4 and it worked. Thanks.

    1 person found this answer helpful.