Spaces:
Paused
Paused
Update index.js
Browse files
index.js
CHANGED
|
@@ -36,7 +36,7 @@ const CONFIG = {
|
|
| 36 |
},
|
| 37 |
DEFAULT_HEADERS: {
|
| 38 |
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36",
|
| 39 |
-
"Cache-Control": "no-cache, no-store
|
| 40 |
"Connection": "close",
|
| 41 |
"Accept": "text/event-stream",
|
| 42 |
"Accept-Encoding": "gzip, deflate, br, zstd",
|
|
@@ -526,7 +526,7 @@ app.post('/hf/v1/chat/completions', async (req, res) => {
|
|
| 526 |
try {
|
| 527 |
console.log("开始请求");
|
| 528 |
//发送请求
|
| 529 |
-
var response = await fetch(`https://
|
| 530 |
method: "POST",
|
| 531 |
headers: {
|
| 532 |
...CONFIG.DEFAULT_HEADERS
|
|
|
|
| 36 |
},
|
| 37 |
DEFAULT_HEADERS: {
|
| 38 |
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36",
|
| 39 |
+
"Cache-Control": "no-cache, no-store",
|
| 40 |
"Connection": "close",
|
| 41 |
"Accept": "text/event-stream",
|
| 42 |
"Accept-Encoding": "gzip, deflate, br, zstd",
|
|
|
|
| 526 |
try {
|
| 527 |
console.log("开始请求");
|
| 528 |
//发送请求
|
| 529 |
+
var response = await fetch(`https://partyrock.aws/stream/getCompletion`, {
|
| 530 |
method: "POST",
|
| 531 |
headers: {
|
| 532 |
...CONFIG.DEFAULT_HEADERS
|