0
点赞
收藏
分享

微信扫一扫

Postman调用人工智能chat功能互动


1、首先访问人工智能官网



Postman调用人工智能chat功能互动_Postman


首先找到Developers,接着API reference

2、点击API reference



Postman调用人工智能chat功能互动_API_02


3、点击chat,复制相关的curl请求

curl https://api.openai.com/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -d '{
    "model": "gpt-3.5-turbo",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

4、在Postman中导入



Postman调用人工智能chat功能互动_Powered by 金山文档_03


5、将箭头位置更换为自己的key



Postman调用人工智能chat功能互动_官网_04


6、获取密钥key



Postman调用人工智能chat功能互动_Postman_05


7、Postman进行测试调用,箭头位置是需要发送的内容



Postman调用人工智能chat功能互动_官网_06


如上内容演示chat部分调用,其他功能也是如此

举报

相关推荐

0 条评论