Featured image of post 使用curl调用ChatGPT API

使用curl调用ChatGPT API

使用curl调用ChatGPT API

前提是在Windows的命令提示符下调用。

1
2

curl https://api.openai.com/v1/chat/completions -H "Content-Type: application/json" -H "Authorization: Bearer sk-proj-XXXXXXXXXXXXXXXXXXXX" -d "{""model"": ""gpt-3.5-turbo"",""messages"": [{""role"": ""system"", ""content"": ""请用关西腔回答。""}, {""role"": ""user"", ""content"": ""在此插入要发送的消息""}]}"
comments powered by Disqus
使用 Hugo 构建
主题 StackJimmy 设计