使用curl在cmd中调用时,注意:json大括号内的每一个双引号前需要加上'\'
curl https://xxxopenai.openai.azure.com/openai/deployments/Your_deployid/chat/completions?api-version=2023-05-15 -H "Content-Type: application/json" -H "api-key:410xxxxxxe7106904" -d "{\"messages\": [{\"role\": \"system\", \"content\": \"hello.\"}]}"
文章来源地址https://www.toymoban.com/news/detail-744355.html
使用postman或getman.cn调用,则不需要
在header中配置如下
文章来源:https://www.toymoban.com/news/detail-744355.html
到了这里,关于使用curl和postman调用Azure OpenAI Restful API的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!