Spaces:
Paused
Paused
Update index.js
Browse files
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.
|
| 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
|