#HELP TO ChatCompletion!!

18 messages · Page 1 of 1 (latest)

earnest wren
#

PLEASE HELP! I have the latest version of the openai library.

'completion = openai.ChatCompletion.create(
^^^^^^^^^^^^^^^^^^^^^^^
"AttributeError: Module 'openai' does not have attribute 'ChatCompletion'. Did you mean "completion"?

fallow inlet
#

Hey hey!

Try createChatCompletion

earnest wren
#

Openai.createChatCompletion?

#

@fallow inlet

fallow inlet
#

Yeah, instead of chatCompletion

#

And then make the request

#

Like this

const completion = await openai.createChatCompletion({
  model: "gpt-3.5-turbo",
  messages: [{ role: "user", content: basePromptPrefix }],
  temperature: 0.7,
});
fallow inlet
#

No, js

earnest wren
#

Response.choices[0].text no??

earnest wren
fallow inlet
#

have you updated openai module?

earnest wren
#

Python error

#

Not js

fallow inlet
#

are you on v0.27.2

earnest wren
fallow inlet
#

Yeah, it seems that it's different