We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我根据readme.md的描述发出请求,得到的是状态码400
fetch('https://burn.hair/v1/chat/completions', { method: 'POST', headers: { 'Authorization': `Bearer ${token}`, 'Content-Type': 'application/json' // 根据API要求可选添加 }, data:{ model: 'gpt-3.5-turbo-0613', messages: [ { role: 'user', content: '你好' } ] } }) .then(response => { if (!response.ok) { throw new Error(`HTTP error! status: ${response.status}`); } return response.json(); // 或者.text()取决于响应类型 }) .then(data => { console.log('请求成功,返回的数据:', data); }) .catch(error => { console.error('请求发生错误:', error); });
The text was updated successfully, but these errors were encountered:
No branches or pull requests
我根据readme.md的描述发出请求,得到的是状态码400
The text was updated successfully, but these errors were encountered: