Spaces:
Running
Running
Update server.js
Browse files
server.js
CHANGED
@@ -329,14 +329,14 @@ app.post('/v1/chat/completions', async (req, res) => {
|
|
329 |
}
|
330 |
});
|
331 |
|
332 |
-
//
|
333 |
-
app.listen(PORT, () => {
|
334 |
console.log(`===================================================`);
|
335 |
-
console.log(` Fal OpenAI Proxy Server (System Top + Separator + Recency)`);
|
336 |
-
console.log(` Listening on port: ${PORT}`);
|
337 |
console.log(` Using Limits: System Prompt=${SYSTEM_PROMPT_LIMIT}, Prompt=${PROMPT_LIMIT}`);
|
338 |
console.log(` Fal AI Key Loaded: ${FAL_KEY ? 'Yes' : 'No'}`);
|
339 |
-
console.log(` Chat Completions Endpoint: POST http://localhost:${PORT}/v1/chat/completions`);
|
340 |
console.log(` Models Endpoint: GET http://localhost:${PORT}/v1/models`);
|
341 |
console.log(`===================================================`);
|
342 |
});
|
|
|
329 |
}
|
330 |
});
|
331 |
|
332 |
+
// 需要修改成嘅版本 (加咗 '0.0.0.0')
|
333 |
+
app.listen(PORT, '0.0.0.0', () => {
|
334 |
console.log(`===================================================`);
|
335 |
+
console.log(` Fal OpenAI Proxy Server (System Top + Separator + Recency)`);
|
336 |
+
console.log(` Listening on host 0.0.0.0, port: ${PORT}`); // <-- 最好改埋 log 方便確認
|
337 |
console.log(` Using Limits: System Prompt=${SYSTEM_PROMPT_LIMIT}, Prompt=${PROMPT_LIMIT}`);
|
338 |
console.log(` Fal AI Key Loaded: ${FAL_KEY ? 'Yes' : 'No'}`);
|
339 |
+
console.log(` Chat Completions Endpoint: POST http://localhost:${PORT}/v1/chat/completions`); // Log 顯示 localhost 冇問題,實際監聽係 0.0.0.0
|
340 |
console.log(` Models Endpoint: GET http://localhost:${PORT}/v1/models`);
|
341 |
console.log(`===================================================`);
|
342 |
});
|