云函数调用接口提示超时 connect ETIMEDOUT 154.92.16.97:443
const response = await axios({
method: 'post',
url:'https://api.openai.com/v1/chat/completions',
headers: {
'Content-Type': 'application/json',
'Authorization': OPENAI_API_KEY1,
},
data: {
model: 'gpt-4',
messages: [{ role: 'user', content: prompt }],
stream: true
},
responseType: 'stream',
});
[图片] postman可以调到,云函数提示超时