OpenAI-API-dotnet icon indicating copy to clipboard operation
OpenAI-API-dotnet copied to clipboard

Azure Chat completions incorrect path

Open JakobWl opened this issue 2 years ago • 5 comments
trafficstars

I am having struggles to use chatgpt in azure somehow the chat endpoint results in this url: https://resourceName.openai.azure.com/openai/deployments/deploymentId/chat/completions?api-version=2022-12-01 Although i want this: https://resourceName.openai.azure.com/openai/deployments/deploymentId/completions?api-version=2022-12-01

Is there any reason behind this or am I not reading the documentation correctly?

JakobWl avatar Mar 15 '23 13:03 JakobWl

Same. I'm getting a 404 / Resource not found error

knavet avatar Mar 16 '23 09:03 knavet

@knavet due to azure using the /completions path rather than /chat/completion i ended up using the CompletionsEndpoint for this but this is obviously unintentional either on azures side or this wrappers

JakobWl avatar Mar 16 '23 11:03 JakobWl

Setting the API version to 2023-03-15-preview fixed this for me

jeffclarenz avatar Mar 22 '23 12:03 jeffclarenz

You can use ChatML with completions (NOT chat) endpoint. https://learn.microsoft.com/en-us/azure/cognitive-services/openai/how-to/chatgpt?pivots=programming-language-chat-ml

KimihikoSaito avatar Mar 26 '23 23:03 KimihikoSaito

I believe they just added an support for this. I had to manually change my API version to make it work though to "2023-03-25-preview"

api.ApiVersion = "2023-03-15-preview";

Read first sentence under "Chat Completions" here: https://learn.microsoft.com/en-us/azure/cognitive-services/openai/reference#chat-completions

Tom-CCC avatar Mar 27 '23 15:03 Tom-CCC