The following curl
command works in azure cli
.
curl https://aoai-try-mc.openai.azure.com/openai/deployments/try-davinci/completions?api-version=2022-12-01 -H "Content-Type:application/json" -H "api-key:keygoeshere" -d '{"prompt":"Tell me a funny story"}'
I have created an equivalent on for powershell
on desktop but it fails. What am I doing wrong?
PS C:\Users\manuchadha> curl https://aoai-try-mc.openai.azure.com/openai/deployments/try-davinci/completions?api-version=2022-12-01 -H @{"Content-Type"="application/json" ; "api-key"="keygoeshere"} -Body @{"prompt"="Tell me a funny story"}
curl : {"error":{"code":"404","message": "Resource not found"}}
At line:1 char:1
+ curl https://aoai-try-mc.openai.azure.com/openai/deployments/try-davi ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebExc
eption
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand