yxmiler commited on
Commit
e686ba5
·
verified ·
1 Parent(s): 5899d72

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +1 -1
index.js CHANGED
@@ -565,7 +565,7 @@ app.post('/hf/v1/chat/completions', async (req, res) => {
565
  case 403:
566
  console.log("请求被阻止");
567
  console.log(JSON.stringify(CONFIG.DEFAULT_HEADERS, null, 2));
568
- //CONFIG.DEFAULT_HEADERS["User-Agent"] = await Utils.getRandomUserAgent();
569
  console.log(response.headers);
570
  throw new Error(`请求失败! status: ${response.statusText},请重新请求,如果多次失败,请重新更换token`);
571
  default:
 
565
  case 403:
566
  console.log("请求被阻止");
567
  console.log(JSON.stringify(CONFIG.DEFAULT_HEADERS, null, 2));
568
+ CONFIG.DEFAULT_HEADERS["User-Agent"] = await Utils.getRandomUserAgent();
569
  console.log(response.headers);
570
  throw new Error(`请求失败! status: ${response.statusText},请重新请求,如果多次失败,请重新更换token`);
571
  default: