#openai.error.InvalidRequestError: Invalid URL (POST /v1/engines/gpt-3.5-turbo/completions)

4 messages · Page 1 of 1 (latest)

grand geode
#

openai pip package throws
openai.error.InvalidRequestError: Invalid URL (POST /v1/engines/gpt-3.5-turbo/completions)

when providing model name

generated_text = openai.Completion.create(
            engine="gpt-3.5-turbo", prompt=prompt, max_tokens=1024
        ).choices[0].text
modest ether
#

I believe you need to use python equivalent of createChatCompletion method available in nodejs

glacial ridge
#

Engine is also a deprecated tag, use model instead