使用curl在cmd中調(diào)用時,注意:json大括號內(nèi)的每一個雙引號前需要加上'\'
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.\"}]}"
?文章來源地址http://www.zghlxwxcb.cn/news/detail-744355.html
?使用postman或getman.cn調(diào)用,則不需要
?
?在header中配置如下
文章來源:http://www.zghlxwxcb.cn/news/detail-744355.html
?
到了這里,關(guān)于使用curl和postman調(diào)用Azure OpenAI Restful API的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!