Spaces:
Running
Running
Upload index.js
Browse files
index.js
CHANGED
@@ -156,7 +156,7 @@ class Utils {
|
|
156 |
});
|
157 |
}
|
158 |
|
159 |
-
static async makeRequest(req) {
|
160 |
try {
|
161 |
if (!CONFIG.API.SIGNATURE_COOKIE) {
|
162 |
await Utils.get_signature();
|
@@ -464,7 +464,7 @@ app.post('/hf/v1/chat/completions', async (req, res) => {
|
|
464 |
}
|
465 |
|
466 |
try {
|
467 |
-
await Utils.makeRequest(req);
|
468 |
} catch (error) {
|
469 |
await Utils.handleError(error, res);
|
470 |
}
|
|
|
156 |
});
|
157 |
}
|
158 |
|
159 |
+
static async makeRequest(req, res) {
|
160 |
try {
|
161 |
if (!CONFIG.API.SIGNATURE_COOKIE) {
|
162 |
await Utils.get_signature();
|
|
|
464 |
}
|
465 |
|
466 |
try {
|
467 |
+
await Utils.makeRequest(req, res);
|
468 |
} catch (error) {
|
469 |
await Utils.handleError(error, res);
|
470 |
}
|