azure-search-openai-demo icon indicating copy to clipboard operation
azure-search-openai-demo copied to clipboard

Messages is a required property in Chat GPT 3.5 Turbo

Open Peraltadarioe opened this issue 2 years ago • 0 comments

When I try to execute the notebooks to introduce to a project I get the error:

openai.error.InvalidRequestError: 'messages' is a required property

completion = openai.Completion.create(
    engine=AZURE_OPENAI_CHATGPT_DEPLOYMENT, 
    prompt=prompt, 
    temperature=0.7, 
    max_tokens=1024,
    stop=["<|im_end|>", "<|im_start|>"])

According to what was published on the Azure page, the new versions of Chat GPT do not work with prompt https://learn.microsoft.com/en-us/azure/cognitive-services/openai/how-to/chatgpt?pivots=programming-language-chat-completions

Peraltadarioe avatar Apr 17 '23 15:04 Peraltadarioe