{"id":1787,"date":"2023-10-05T11:35:54","date_gmt":"2023-10-05T03:35:54","guid":{"rendered":"http:\/\/i-services.info\/cspclm\/?p=1787"},"modified":"2023-10-05T11:46:35","modified_gmt":"2023-10-05T03:46:35","slug":"%e5%a6%82%e4%bd%95%e7%94%a8postman%e4%be%86%e5%91%bc%e5%8f%ab-azure-openai-%e7%9a%84-api-step-by-step-tutorial","status":"publish","type":"post","link":"http:\/\/i-services.info\/cspclm\/?p=1787","title":{"rendered":"\u5982\u4f55\u7528Postman\u4f86\u547c\u53eb Azure OpenAI \u7684 API &mdash; Step-by-Step-Tutorial"},"content":{"rendered":"<p><\/p>\n<p><font color=\"#000000\"><\/font><\/p>\n<p><font color=\"#000000\"><\/font><\/p>\n<p><font color=\"#000000\"><\/font><\/p>\n<p><font color=\"#000000\"><\/font><\/p>\n<p><a href=\"http:\/\/i-services.info\/cspclm\/wp-content\/uploads\/2023\/10\/%E5%9C%96%E7%89%872-10.png\"><font color=\"#000000\"><a href=\"http:\/\/i-services.info\/cspclm\/wp-content\/uploads\/2023\/10\/%E5%9C%96%E7%89%872-11.png\"><img loading=\"lazy\" width=\"604\" height=\"531\" title=\"\u5716\u72472\" style=\"display: inline; background-image: none;\" alt=\"\u5716\u72472\" src=\"http:\/\/i-services.info\/cspclm\/wp-content\/uploads\/2023\/10\/%E5%9C%96%E7%89%872_thumb.png\" border=\"0\"><\/a><\/font><\/a><\/p>\n<p><font color=\"#000000\"><br \/><\/font><\/p>\n<p><font color=\"#000000\">\u55e8\u5927\u5bb6\u597d\uff0c\u4eca\u5929\u7684\u6587\u7ae0\u8981\u4ecb\u7d39\u7684\u662f\u5982\u4f55\u7528Postman\u4f86\u547c\u53eb Azure OpenAI \u7684 API\u3002<\/font><\/p>\n<p><font color=\"#000000\">\u6587\u7ae0\u5927\u81f4\u4e0a\u6703\u5206\u70ba\u5e7e\u500b\u968e\u6bb5:<\/font><\/p>\n<ol>\n<li><font color=\"#000000\">\u4ecb\u7d39API\u8207Postman<br \/>\n<\/font><\/p>\n<li><font color=\"#000000\">\u5275\u5efaAzure OpenAI Service\uff0c\u7372\u53d6\u8a72\u670d\u52d9\u7684Key\u548cEndpoint<br \/>\n<\/font><\/p>\n<li><font color=\"#000000\">\u5728Postman\u4e0a\u5efa\u7acb\u65b0\u7684Collection\u4e26\u9023\u63a5Azure OpenAI<br \/>\n<\/font><\/p>\n<li><font color=\"#000000\">\u52a0\u5f37\u8cc7\u5b89\u63aa\u65bd\uff0c\u5c07Key\u548cEndpoint\u5beb\u9032\u74b0\u5883\u8b8a\u6578\u4e2d<br \/>\n<\/font><\/p>\n<li><font color=\"#000000\">\u7d50\u8ad6 <\/font><\/li>\n<\/ol>\n<p><font color=\"#000000\">\u5728\u9032\u5165\u6b63\u5f0f\u6b65\u9a5f\u524d\uff0c\u5148\u4f86\u4ecb\u7d39\u4e00\u4e0b API \u7684\u6982\u5ff5\u4ee5\u53ca Postman \u9019\u500b\u597d\u7528\u7684 API \u4e92\u52d5\u5de5\u5177\u5427\uff01<\/font><\/p>\n<h2><font color=\"#000000\"><font style=\"font-weight: bold;\">\u4ecb\u7d39API\u8207Postman<\/font><\/font><\/h2>\n<h3><font color=\"#000000\"><font style=\"font-weight: bold;\">\u751a\u9ebc\u662f API ?<\/font><\/font><\/h3>\n<p><font color=\"#000000\"><strong>\u61c9\u7528\u7a0b\u5e8f\u4ecb\u9762(API) <\/strong>\u7684\u5168\u540d\u662f<strong>\u300cApplication Programming Interface\u300d\uff0c<\/strong>\u6211\u5011\u53ef\u4ee5\u4f7f\u7528\u5b83\u4f86\u5275\u5efa\u8edf\u9ad4\u6216\u8207\u5916\u90e8\u7cfb\u7d71\u4e92\u52d5\uff0c\u6709\u9ede\u50cf\u662f\u6211\u5011\u7684\u7a0b\u5f0f\u8207\u5916\u754c\u7684\u6a4b\u6a11\uff0cAPI \u6709\u8a31\u591a\u5f62\u5f0f\uff0c\u53ef\u4ee5\u662f\u4e00\u500b\u6307\u4ee4\u3001\u529f\u80fd\u3001\u5354\u8b70\u6216\u662f\u4e00\u500b\u5c0d\u8c61\u3002<\/font><\/p>\n<p><font color=\"#000000\">\u8209\u4f8b\u4f86\u8aaa\uff0c\u5982\u679c\u6211\u5011\u53bb\u9910\u5ef3\uff0c\u60f3\u9ede\u4e00\u4efdPizza\u4f86\u5403\uff0c\u9019\u6642\u5019\u9910\u5ef3\u88e1\u7684\u5206\u5225\u626e\u6f14\u7684\u89d2\u8272\u5c31\u50cf\u662f:<\/font><\/p>\n<ul>\n<li><font color=\"#000000\">\u6211\u5011(User)<br \/>\n<\/font><\/p>\n<li><font color=\"#000000\">\u6ac3\u53f0\u4eba\u54e1(API)<br \/>\n<\/font><\/p>\n<li><font color=\"#000000\">\u5eda\u5e2b(\u61c9\u7528\u7a0b\u5f0f) <\/font><\/li>\n<\/ul>\n<p><font color=\"#000000\">\u7372\u53d6API\u7684\u65b9\u5f0f\u5c31\u50cf\u6211\u5011\u4e0d\u9700\u8981\u81ea\u5df1\u9032\u5eda\u623f\u53bb\u4f5c\u51fa\u4e00\u4efdPizza\uff1a\u6211\u5011(User)\u9032\u5230\u9910\u5ef3\uff0c\u5411\u6ac3\u6aaf\u4eba\u54e1(API)\u9ede\u9910(\u4e0b\u6307\u4ee4)\uff0c\u4e26\u5c07\u6211\u5011\u7684\u9700\u6c42(request)\u9001\u5230\u5eda\u5e2b(\u61c9\u7528\u7a0b\u5f0f)\uff0c\u5eda\u5e2b\u660e\u767d\u9700\u6c42\u5f8c\u505a\u51fa\u9999\u5674\u5674\u7684\u98df\u7269(response)\u9001\u5230\u6211\u5011\u624b\u4e2d\u3002<\/font><\/p>\n<p><font size=\"3\"><font size=\"2\">( \u60f3\u4e86\u89e3\u66f4\u591a\u53ef\u4ee5\u53c3\u8003\u9019\u500b\u5f71\u7247:<font color=\"#000000\"><a href=\"https:\/\/youtu.be\/s7wmiS2mSXY?si=cQn2EhsFuXPLvRrs\" target=\"_blank\" rel=\"noopener\">What is an API? <\/a>)<\/font><\/font><\/font><\/p>\n<p><\/p>\n<p><font color=\"#000000\">\u6709\u4e86\u7c21\u55ae\u7684 API \u6982\u5ff5\u5f8c\uff0c\u63a5\u4e0b\u4f86\u6211\u5011\u4f86\u8a8d\u8b58 Postman\u662f\u751a\u9ebc\u3002<\/font><\/p>\n<p><\/p>\n<h3><font style=\"font-weight: bold;\">\u751a\u9ebc\u662fPostman ?<\/font><\/h3>\n<p>Postman \u662f\u76ee\u524d\u6700\u88ab\u5ee3\u6cdb\u4f7f\u7528\u7684API\u4e92\u52d5\u5de5\u5177\u4e4b\u4e00\uff0c\u6bcf\u500b\u6708\u6709\u8d85\u904e\u4e94\u767e\u842c\u7684\u4f7f\u7528\u8005\uff0c\u5b83\u63d0\u4f9b\u4e86\u4e00\u500b\u53cb\u5584\u7684\u754c\u9762\u4f86\u767c\u9001\u8acb\u6c42\u5230 API \u4e26\u5f9e API \u63a5\u6536\u56de\u61c9\uff0c\u4f7f\u7528Postman \u8b93 API \u958b\u767c\u8b8a\u5f97\u5bb9\u6613\u548c\u7c21\u55ae\uff0c\u56e0\u70ba\u5b83\u80fd\u9032\u884c\u5404\u7a2e\u985e\u578b\u7684 HTTP \u8acb\u6c42\uff08GET\u3001POST\u3001PUT\u3001PATCH\uff09\uff0c\u4e5f\u80fd\u4fdd\u7559\u74b0\u5883\u4ee5\u4f9b\u5f8c\u7e8c\u4f7f\u7528\uff0c\u9084\u53ef\u4ee5\u5c07 API \u8f49\u63db\u70ba\u5404\u7a2e\u7a0b\u5f0f\u8a9e\u8a00\uff08\u5982 JavaScript\u3001Python\uff09\u3002<\/p>\n<p><\/p>\n<p><font color=\"#000000\">\u60f3\u50cf\u4e00\u4e0b\u6211\u5011\u73fe\u5728\u6709\u500b\u5145\u6eff\u73a9\u5177\u7684\u5927\u7bb1\u5b50(\u61c9\u7528\u7a0b\u5f0f)\uff0c\u4f46\u662f\u7bb1\u5b50\u88ab\u9396\u4f4f\u4e86\uff0c\u9700\u8981\u4e00\u628a\u7279\u6b8a\u7684\u9470\u5319(API)\u4f86\u6253\u958b\u5b83\u3002\u800cPostman\u662f\u6211\u5011\u7684\u597d\u670b\u53cb\uff0c\u4ed6\u5f88\u64c5\u9577\u65bc\u4f7f\u7528\u9019\u628a\u7279\u6b8a\u7684\u9470\u5319\u3002\u6211\u5011\u53ea\u8981\u544a\u8a34Postman\u60f3\u8981\u5f9e\u7bb1\u5b50\u88e1\u62ff\u51fa\u4ec0\u9ebc\u73a9\u5177\uff0c\u6216\u8005\u60f3\u653e\u4ec0\u9ebc\u65b0\u73a9\u5177\u9032\u53bb\u5c31\u53ef\u4ee5\uff0c\u5b83\u5c31\u6703\u5e6b\u6211\u5011\u9054\u6210\u3002\u300cApp\u300d\u5982\u5176\u540d\uff0cPostman\u5c31\u50cf\u4e00\u500b\u5e6b\u52a9\u6211\u5011\u8207\u96fb\u8166\u66f8\u4fe1\u5f80\u4f86\u7684\u53cb\u597d\u300c\u90f5\u5dee\u300d\u3002<\/font><\/p>\n<p><\/p>\n<p><font color=\"#000000\"><font size=\"2\">(\u900f\u904e\u9019\u500b\u9023\u7d50\u4f86<\/font><a href=\"https:\/\/www.postman.com\/downloads\/\" target=\"_blank\" rel=\"noopener\"><font size=\"2\">\u4e0b\u8f09 Postman<\/font><\/a><font size=\"2\"> )<\/font><\/font><\/p>\n<p><\/p>\n<p><font color=\"#000000\">\u63a5\u4e0b\u4f86\u5c31\u9032\u5165\u9019\u6b21\u7684\u4e3b\u9ad4\uff0c Azure OpenAI \u8207 Postman \u7684\u6574\u5408\u4e4b\u65c5\uff0c\u8b93\u6211\u5011\u958b\u59cb\u5427\uff01<\/font><\/p>\n<h2><font style=\"font-weight: bold;\">\u5275\u5efaAzure OpenAI Service\uff0c\u7372\u53d6\u8a72\u670d\u52d9\u7684Key\u548cEndpoint<\/font><\/h2>\n<ol>\n<li>\n<p><font color=\"#000000\">\u4f86\u5230<\/font><a href=\"https:\/\/portal.azure.com\/#home\" target=\"_blank\" rel=\"noopener\">Azure Portal<\/a><font color=\"#000000\"><\/font><\/p>\n<li>\n<p><font color=\"#000000\">\u641c\u5c0b\u300cOpenAI\u300d\u4e26\u5efa\u7acb\u670d\u52d9<\/font><\/p>\n<p><font color=\"#000000\"><a href=\"http:\/\/i-services.info\/cspclm\/wp-content\/uploads\/2023\/10\/2-2.png\"><img loading=\"lazy\" width=\"904\" height=\"784\" title=\"2\" style=\"display: inline; background-image: none;\" alt=\"2\" src=\"http:\/\/i-services.info\/cspclm\/wp-content\/uploads\/2023\/10\/2_thumb-2.png\" border=\"0\"><\/a><\/font><\/p>\n<li>\n<p><font color=\"#000000\">\u9032\u5230\u5efa\u7acb\u597d\u7684\u670d\u52d9\uff0c\u5f9e\u300cResource Management\u300d\u4e2d\u9032\u5230\u300cKeys and Endpoint\u300d\u4e26\u53d6\u5f97KEY\u503c\uff0c\u7559\u8457\u7a0d\u5f8c\u4f7f\u7528<\/font><\/p>\n<p><font color=\"#000000\"><\/font><a href=\"http:\/\/i-services.info\/cspclm\/wp-content\/uploads\/2023\/10\/3-2.png\"><img loading=\"lazy\" width=\"904\" height=\"489\" title=\"3\" style=\"display: inline; background-image: none;\" alt=\"3\" src=\"http:\/\/i-services.info\/cspclm\/wp-content\/uploads\/2023\/10\/3_thumb-2.png\" border=\"0\"><\/a><\/p>\n<li>\n<p><font color=\"#000000\">\u63a5\u4e0b\u4f86\u9ede\u9078\u300cGo to Azure OpenAI Studio\u300d<\/font><\/p>\n<p><font color=\"#000000\"><\/font><a href=\"http:\/\/i-services.info\/cspclm\/wp-content\/uploads\/2023\/10\/4-2.png\"><img loading=\"lazy\" width=\"904\" height=\"310\" title=\"4\" style=\"display: inline; background-image: none;\" alt=\"4\" src=\"http:\/\/i-services.info\/cspclm\/wp-content\/uploads\/2023\/10\/4_thumb-2.png\" border=\"0\"><\/a><\/p>\n<li>\n<p><font color=\"#000000\">\u5230\u300cDeployments\u300d\u90e8\u5c6c\u6a21\u578b\u4e26\u9032\u5230\u300cPlayground\u300d\u7684Chat<\/font><\/p>\n<p><font color=\"#000000\"><\/font><a href=\"http:\/\/i-services.info\/cspclm\/wp-content\/uploads\/2023\/10\/4.5-2.png\"><img loading=\"lazy\" width=\"904\" height=\"407\" title=\"4.5\" style=\"display: inline; background-image: none;\" alt=\"4.5\" src=\"http:\/\/i-services.info\/cspclm\/wp-content\/uploads\/2023\/10\/4.5_thumb-2.png\" border=\"0\"><\/a><\/p>\n<li>\n<p><font color=\"#000000\">\u78ba\u5b9a\u6a21\u578b\u53ef\u4ee5\u4f7f\u7528\u5f8c\u9ede\u9078\u300cView code\u300d\uff0c\u8a2d\u5b9a\u6539\u6210\u300cjson\u300d\uff0c\u4e26\u8907\u88fd\u7a0b\u5f0f\u78bc\uff0c\u63a5\u8457\u8907\u88fd\u670d\u52d9\u7684\u7aef\u9ede(Endpoint)\uff0c\u7559\u8457\u7a0d\u5f8c\u4f7f\u7528<\/font><\/p>\n<p><font color=\"#000000\"><a href=\"http:\/\/i-services.info\/cspclm\/wp-content\/uploads\/2023\/10\/5-2.png\"><img loading=\"lazy\" width=\"904\" height=\"483\" title=\"5\" style=\"display: inline; background-image: none;\" alt=\"5\" src=\"http:\/\/i-services.info\/cspclm\/wp-content\/uploads\/2023\/10\/5_thumb-2.png\" border=\"0\"><\/a><\/font><\/p>\n<p><font color=\"#000000\"><a href=\"http:\/\/i-services.info\/cspclm\/wp-content\/uploads\/2023\/10\/6-2.png\"><img loading=\"lazy\" width=\"904\" height=\"1045\" title=\"6\" style=\"display: inline; background-image: none;\" alt=\"6\" src=\"http:\/\/i-services.info\/cspclm\/wp-content\/uploads\/2023\/10\/6_thumb-2.png\" border=\"0\"><\/a><\/font><\/p>\n<\/li>\n<\/ol>\n<p><font color=\"#000000\">Azure\u90e8\u5206\u5230\u9019\u908a\u544a\u4e00\u6bb5\u843d\uff0c\u8a18\u5f97\u5c07\u4e0a\u9762\u6240\u8907\u88fd\u7684\u8cc7\u6599\u7559\u5b58\u597d\uff0c\u4ee5\u4fbf\u5f85\u6703\u4f7f\u7528<\/font><\/p>\n<h2>\u5728Postman\u4e0a\u5efa\u7acb\u65b0\u7684Collection\u4e26\u9023\u63a5Azure OpenAI<\/h2>\n<ol>\n<li>\n<p><font color=\"#000000\">\u7b2c\u4e00\u6b21\u4f7f\u7528Postman\u9700\u5148\u5efa\u7acb\u4e00\u500b\u65b0\u7684\u300cWorkspaces\u300d\uff0c\u4e26\u9078\u53d6\u300cNew\u300d\u5efa\u7acb\u65b0\u7684\u300cCollection\u300d\uff0c\u5efa\u597d\u5f8c\u9078\u53d6\u300cAdd a request\u300d<\/font><\/p>\n<p><a href=\"http:\/\/i-services.info\/cspclm\/wp-content\/uploads\/2023\/10\/7-2.png\"><img loading=\"lazy\" width=\"904\" height=\"511\" title=\"7\" style=\"display: inline; background-image: none;\" alt=\"7\" src=\"http:\/\/i-services.info\/cspclm\/wp-content\/uploads\/2023\/10\/7_thumb-2.png\" border=\"0\"><\/a><\/p>\n<li>\n<p><font color=\"#000000\">\u8abf\u6574\u525b\u5efa\u597d\u7684Request\uff0c\u5c07GET\u6539\u6210\u300cPOST\u300d\uff0c\u9078\u53d6\u300cBody\u300d\u7684\u300craw\u300d\uff0c\u4e26\u5c07\u300cText\u300d\u6539\u6210\u300cJSON\u300d\u683c\u5f0f<\/font><\/p>\n<p><a href=\"http:\/\/i-services.info\/cspclm\/wp-content\/uploads\/2023\/10\/8-2.png\"><img loading=\"lazy\" width=\"904\" height=\"590\" title=\"8\" style=\"display: inline; background-image: none;\" alt=\"8\" src=\"http:\/\/i-services.info\/cspclm\/wp-content\/uploads\/2023\/10\/8_thumb-2.png\" border=\"0\"><\/a><\/p>\n<li>\n<p><font color=\"#000000\">\u8cbc\u4e0a\u525b\u624d\u8907\u88fd\u7684\u300cEndpoint\u300d\u548c\u7a0b\u5f0f\u78bc\u4e26\u8a66\u8457\u767c\u9001\u300cPOST\u300dRequest<\/font><\/p>\n<p><a href=\"http:\/\/i-services.info\/cspclm\/wp-content\/uploads\/2023\/10\/9-2.png\"><img loading=\"lazy\" width=\"904\" height=\"494\" title=\"9\" style=\"display: inline; background-image: none;\" alt=\"9\" src=\"http:\/\/i-services.info\/cspclm\/wp-content\/uploads\/2023\/10\/9_thumb-2.png\" border=\"0\"><\/a><\/p>\n<li>\n<p><font color=\"#000000\">\u4e0d\u904e\u9019\u6642\u5019\u6703\u767c\u73fe HTTP \u72c0\u614b\u78bc\u56de\u50b3\u300c401 Permission Denied\u300d\uff0c\u56e0\u70ba\u6211\u5011\u9084\u6c92\u63d0\u4f9b\u8a72\u670d\u52d9\u7684Key\u503c<\/font><\/p>\n<p><font color=\"#000000\">\u8a3b: \u60f3\u4e86\u89e3 HTTP \u72c0\u614b\u78bc\u7684\u8b80\u8005\u53ef\u4ee5\u53c3\u8003<a href=\"https:\/\/www.webfx.com\/web-development\/glossary\/http-status-codes\/\" target=\"_blank\" rel=\"noopener\">\u9019\u500b\u7db2\u7ad9<\/a><u><font color=\"#669966\"> <\/font><\/u><\/font><\/p>\n<\/li>\n<\/ol>\n<p><font color=\"#000000\"><font color=\"#000000\"><font color=\"#000000\"><font color=\"#000000\"><font color=\"#000000\"><font color=\"#000000\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href=\"http:\/\/i-services.info\/cspclm\/wp-content\/uploads\/2023\/10\/10-2.png\"><img loading=\"lazy\" width=\"904\" height=\"440\" title=\"10\" style=\"display: inline; background-image: none;\" alt=\"10\" src=\"http:\/\/i-services.info\/cspclm\/wp-content\/uploads\/2023\/10\/10_thumb-2.png\" border=\"0\"><\/a><\/font><\/font><\/font><\/font><\/font><\/font><\/p>\n<p><font color=\"#000000\">5.&nbsp; <font color=\"#000000\"><font color=\"#000000\"><font color=\"#000000\"><font color=\"#000000\">\u9078\u53d6\u300cParams\u300d\uff0c\u4e26\u52a0\u5165\u53c3\u6578\u300capi-key\u300d\uff0c\u5728Value\u7684\u90e8\u5206\u8cbc\u4e0a\u525b\u624d\u8907\u88fd\u7684key\uff0c\u518d\u767c\u9001\u4e00\u6b21\u300cPOST\u300drequest\uff0c\u770b\u5230HTTP\u72c0\u614b\u78bc\u986f\u793a \u300c200 OK\u300d\uff0c\u53ef\u4ee5\u767c\u73fe\u6709\u6210\u529f\u6536\u5230content\u7684\u5167\u5bb9\u4ee3\u8868\u6211\u5011\u6210\u529f\u547c\u53eb Azure OpenAI \u7684 API \u56c9\uff01<\/font><\/font><\/font><\/font><\/font><\/p>\n<p><font color=\"#000000\"><\/font><\/p>\n<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href=\"http:\/\/i-services.info\/cspclm\/wp-content\/uploads\/2023\/10\/11-2.png\"><img loading=\"lazy\" width=\"904\" height=\"429\" title=\"11\" style=\"display: inline; background-image: none;\" alt=\"11\" src=\"http:\/\/i-services.info\/cspclm\/wp-content\/uploads\/2023\/10\/11_thumb-2.png\" border=\"0\"><\/a><\/p>\n<p><font color=\"#000000\">\u6210\u529f\u5730\u547c\u53eb\u4e86API\u5f88\u958b\u5fc3\uff0c\u4f46\u662f\u9732\u51fa\u79c1\u5bc6\u7684\u91d1\u9470\u9084\u662f\u6703\u89ba\u5f97\u602a\u602a\u7684\uff0c\u7562\u7adf\u8cc7\u5b89\u98a8\u96aa\u662f\u6211\u5011\u90fd\u8981\u8b39\u614e\u7684\u8b70\u984c\uff0c\u4e00\u4e0d\u5c0f\u5fc3\u5916\u6d41\u51fa\u53bb\u53ef\u80fd\u9020\u6210\u6a5f\u5bc6\u516c\u958b\u6216\u662f\u6210\u672c\u7684\u91cd\u5927\u640d\u5931\u3002<\/font><\/p>\n<p><font color=\"#000000\">\u63a5\u4e0b\u4f86\u6211\u5011\u5c31\u4f86\u770b\u5982\u4f55\u52a0\u5f37\u8cc7\u5b89\u65b9\u9762\u7684\u63aa\u65bd\uff0c\u8b93\u6211\u5011\u80fd\u66f4\u5b89\u5fc3\u5730\u4f7f\u7528Postman\u3002<\/font><\/p>\n<h2><font style=\"font-weight: bold;\">\u52a0\u5f37\u8cc7\u5b89\u63aa\u65bd\uff0c\u5c07Key\u548cEndpoint\u5beb\u9032\u74b0\u5883\u8b8a\u6578\u4e2d<\/font><\/h2>\n<p>\u5c07Key \u503c\u548cEndpoint\u5beb\u9032\u74b0\u5883\u8b8a\u6578\u4e2d\uff0c\u662f\u5f88\u68d2\u7684\u9632\u8b77\u63aa\u65bd\uff0c\u800c\u63a1\u53d6\u9019\u7a2e\u65b9\u6cd5\u80fd\u5e36\u4f86\u8a31\u591a\u597d\u8655\uff0c\u56e0\u70ba\u5b83\u4e0d\u50c5\u63d0\u5347\u4e86\u5b89\u5168\u6027\uff0c\u4e5f\u4f7f\u7a0b\u5f0f\u66f4\u5bb9\u6613\u7dad\u8b77\u3002<\/p>\n<ol>\n<li>\n<p><font color=\"#000000\">\u9ede\u9078\u4e00\u65c1\u7684\u300cEnvironment\u300d\uff0c\u6dfb\u52a0Key \u503c\u548cEndpoint\uff0c\u4e26\u5c07 Type \u8a2d\u6210\u300csecret\u300d<\/font><\/p>\n<p><font color=\"#000000\">(\u90e8\u5c6c\u7684\u6a21\u578b\u4ee5\u53caAPI\u7248\u672c\u4e5f\u53ef\u5beb\u9032\u74b0\u5883\u8b8a\u6578\u4e2d\uff0c\u4e0d\u904e\u9019\u5169\u500b\u503c\u6bd4\u8f03\u4e0d\u50cfKey \u503c\u548cEndpoint\u662f\u654f\u611f\u8cc7\u8a0a\uff0c\u53ef\u4ee5\u8996\u60c5\u6cc1\u6c7a\u5b9a\u3002 )<\/font><\/p>\n<p><font color=\"#000000\"><a href=\"http:\/\/i-services.info\/cspclm\/wp-content\/uploads\/2023\/10\/12-2.png\"><img loading=\"lazy\" width=\"904\" height=\"218\" title=\"12\" style=\"display: inline; background-image: none;\" alt=\"12\" src=\"http:\/\/i-services.info\/cspclm\/wp-content\/uploads\/2023\/10\/12_thumb-2.png\" border=\"0\"><\/a><\/font><\/p>\n<li>\n<p><font color=\"#000000\">\u5c07\u8981\u50b3\u9001\u300cPOST\u300drequest\u7684\u7db2\u5740\u6539\u6210\u4e0b\u5217\u7684\u683c\u5f0f\uff0c\u4e26\u767c\u9001\u8acb\u6c42\uff0c\u5982\u679c\u6709\u5f97\u5230content\u4ee3\u8868\u8acb\u6c42\u6210\u529f\u56c9\uff01<\/font><\/p>\n<\/li>\n<\/ol>\n<blockquote>\n<p><font color=\"#000000\"><font color=\"#000000\"><code><font color=\"#000000\"><font color=\"#f79646\">{{OPENAI_API_BASE}}<\/font>\/openai\/deployments\/<font color=\"#f79646\">{{CHATCOMPLETION_MODEL}}<\/font>\/chat\/completions?api-version=<font color=\"#f79646\">{{OPENAI_API_VERSION}}<\/font>&amp;api-key=<font color=\"#f79646\">{{OPENAI_API_KEY}}<\/font><\/font><\/code><\/font><\/font><\/p>\n<\/blockquote>\n<ol>\n<p><font color=\"#000000\"><a href=\"http:\/\/i-services.info\/cspclm\/wp-content\/uploads\/2023\/10\/13-2.png\"><img loading=\"lazy\" width=\"904\" height=\"547\" title=\"13\" style=\"display: inline; background-image: none;\" alt=\"13\" src=\"http:\/\/i-services.info\/cspclm\/wp-content\/uploads\/2023\/10\/13_thumb-2.png\" border=\"0\"><\/a><\/font><\/p>\n<\/ol>\n<p>\u4f7f\u7528\u74b0\u5883\u8b8a\u6578\uff0c\u6211\u5011\u53ef\u4ee5\u907f\u514d\u5c07\u654f\u611f\u4fe1\u606f\u76f4\u63a5\u5beb\u5165\u7a0b\u5f0f\u4e2d\uff0c\u4fdd\u8b77\u91d1\u9470\u4e0d\u88ab\u672a\u7d93\u6388\u6b0a\u7684\u4eba\u54e1\u4f7f\u7528\u6216\u6cc4\u9732\u3002<\/p>\n<p><\/p>\n<p>\u518d\u4f86\uff0c\u5982\u679c\u4eca\u5929\u9700\u8981\u522a\u9664\u539f\u6709\u7684Azure OpenAI Service\uff0c\u4e26\u5efa\u7acb\u4e00\u500b\u65b0\u7684\u670d\u52d9\uff0c\u6211\u5011\u53ea\u9700\u66f4\u6539\u74b0\u5883\u4e2d\u7684\u8b8a\u6578\uff0c\u800c\u7121\u9700\u4fee\u6539\u4efb\u4f55\u7a0b\u5f0f\u78bc\uff0c\u5927\u5927\u964d\u4f4e\u4e86\u7dad\u8b77\u7684\u8907\u96dc\u6027\u4e26\u63d0\u9ad8\u4e86\u6548\u7387\u3002<\/p>\n<p><\/p>\n<p><font color=\"#000000\">\u73fe\u5728\u5c31\u5c07\u4f60\u7684\u91d1\u9470\u5132\u5b58\u5230\u74b0\u5883\u8b8a\u6578\u4e2d\uff0c\u70ba\u4f60\u7684\u7a0b\u5f0f\u589e\u6dfb\u66f4\u591a\u4fdd\u8b77\u5427\uff01<\/font><\/p>\n<h2><font style=\"font-weight: bold;\">\u7d50\u8ad6<\/font><\/h2>\n<p><font color=\"#000000\">\u900f\u904e\u9019\u7bc7\u6587\u7ae0\uff0c\u6211\u5011\u4e00\u6b65\u6b65\u8d70\u904e\u4e86\u5982\u4f55\u4f7f\u7528Postman\u4f86\u547c\u53ebAzure OpenAI\u7684API\uff0c\u5f9e\u57fa\u672c\u7684API\u548cPostman\u4ecb\u7d39\uff0c\u5230\u900f\u904ePostman\u7684\u53cb\u5584\u754c\u9762\uff0c\u6211\u5011\u80fd\u5920\u8f15\u9b06\u5730\u8207Azure OpenAI\u9032\u884c\u4e92\u52d5\u7684\u5be6\u969b\u64cd\u4f5c\u548c\u8cc7\u5b89\u52a0\u56fa\u7684\u6b65\u9a5f\uff0c\u5c07\u91d1\u9470\u548cEndpoint\u5132\u5b58\u81f3\u74b0\u5883\u8b8a\u6578\u4e2d\uff0c\u4e0d\u50c5\u8b93\u6211\u5011\u7684\u7a0b\u5f0f\u66f4\u5b89\u5168\uff0c\u4e5f\u4f7f\u5f97\u7dad\u8b77\u5de5\u4f5c\u66f4\u70ba\u4fbf\u5229\u3002<\/font><\/p>\n<p><font color=\"#000000\">Postman\u662f\u4e00\u500b\u975e\u5e38\u6709\u7528\u7684\u5de5\u5177\uff0c\u672a\u4f86\u7121\u8ad6\u8981\u9032\u884cAPI\u6e2c\u8a66\u6216\u662f\u8207\u4e0d\u540c\u7684\u670d\u52d9\u9032\u884c\u4e32\u63a5\uff0c\u5728\u95b1\u8b80\u5b8c\u5f8c\uff0c\u61c9\u8a72\u6703\u5c0d\u9019\u6574\u500b\u6d41\u7a0b\u6709\u66f4\u6e05\u6670\u7684\u7406\u89e3\u3002<\/font><\/p>\n<p><font color=\"#000000\">\u5e0c\u671b\u900f\u904e\u9019\u7bc7\u6559\u5b78\uff0c\u4f60\u6709\u7372\u5f97\u4e00\u4e9b\u5be6\u7528\u7684\u77e5\u8b58\uff0c\u4e26\u61c9\u7528\u5728\u672a\u4f86\u7a0b\u5f0f\u958b\u767c\u7684\u65c5\u7a0b\u4e2d\u3002<\/font><\/p>\n<h5>\n<p><font color=\"#000000\"><br \/><\/font><\/p>\n<\/h5>\n","protected":false},"excerpt":{"rendered":"<p>\u55e8\u5927\u5bb6\u597d\uff0c\u4eca\u5929\u7684\u6587\u7ae0\u8981\u4ecb\u7d39\u7684\u662f\u5982\u4f55\u7528Postman\u4f86\u547c\u53eb Azure OpenAI \u7684 API\u3002 \u6587\u7ae0\u5927\u81f4\u4e0a\u6703\u5206\u70ba\u5e7e\u500b\u968e\u6bb5: \u4ecb\u7d39API\u8207Postman \u5275\u5efaA&#46;&#46;&#46;<\/p>\n","protected":false},"author":4,"featured_media":1762,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[22],"tags":[],"_links":{"self":[{"href":"http:\/\/i-services.info\/cspclm\/index.php?rest_route=\/wp\/v2\/posts\/1787"}],"collection":[{"href":"http:\/\/i-services.info\/cspclm\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/i-services.info\/cspclm\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/i-services.info\/cspclm\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"http:\/\/i-services.info\/cspclm\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1787"}],"version-history":[{"count":6,"href":"http:\/\/i-services.info\/cspclm\/index.php?rest_route=\/wp\/v2\/posts\/1787\/revisions"}],"predecessor-version":[{"id":1855,"href":"http:\/\/i-services.info\/cspclm\/index.php?rest_route=\/wp\/v2\/posts\/1787\/revisions\/1855"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/i-services.info\/cspclm\/index.php?rest_route=\/wp\/v2\/media\/1762"}],"wp:attachment":[{"href":"http:\/\/i-services.info\/cspclm\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1787"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/i-services.info\/cspclm\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1787"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/i-services.info\/cspclm\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1787"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}