yxmiler commited on
Commit
4304992
·
verified ·
1 Parent(s): 16e7e4c

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +3 -1
index.js CHANGED
@@ -523,10 +523,12 @@ app.post('/hf/v1/chat/completions', async (req, res) => {
523
  await tokenManager.updateCacheTokens();
524
  const apiClient = new ApiClient(req.body.model);
525
  const requestPayload = await apiClient.transformMessages(req.body);
 
 
526
  try {
527
  console.log("开始请求");
528
  //发送请求
529
- var response = await fetch(`${CONFIG.API.DENO_URL}`, {
530
  method: "POST",
531
  headers: {
532
  ...CONFIG.DEFAULT_HEADERS
 
523
  await tokenManager.updateCacheTokens();
524
  const apiClient = new ApiClient(req.body.model);
525
  const requestPayload = await apiClient.transformMessages(req.body);
526
+ console.log(JSON.stringify(CONFIG.DEFAULT_HEADERS, null, 2));
527
+
528
  try {
529
  console.log("开始请求");
530
  //发送请求
531
+ var response = await fetch(`${CONFIG.API.BASE_URL}`, {
532
  method: "POST",
533
  headers: {
534
  ...CONFIG.DEFAULT_HEADERS