:zap: [Enhance] Remove live.js to reduce network cost
Browse files- index.html +0 -1
- server.js +1 -0
index.html
CHANGED
@@ -21,7 +21,6 @@
|
|
21 |
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.30.1/moment-with-locales.min.js"></script>
|
22 |
<script src="https://cdnjs.cloudflare.com/ajax/libs/dexie/3.2.4/dexie.min.js"></script>
|
23 |
<script src="https://cdnjs.cloudflare.com/ajax/libs/darkreader/4.9.75/darkreader.min.js"></script>
|
24 |
-
<script src="./networks/live.js"></script>
|
25 |
<link rel="stylesheet" href="./css/default.css" />
|
26 |
</head>
|
27 |
|
|
|
21 |
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.30.1/moment-with-locales.min.js"></script>
|
22 |
<script src="https://cdnjs.cloudflare.com/ajax/libs/dexie/3.2.4/dexie.min.js"></script>
|
23 |
<script src="https://cdnjs.cloudflare.com/ajax/libs/darkreader/4.9.75/darkreader.min.js"></script>
|
|
|
24 |
<link rel="stylesheet" href="./css/default.css" />
|
25 |
</head>
|
26 |
|
server.js
CHANGED
@@ -121,6 +121,7 @@ app.post("/chat/completions", async (req, res) => {
|
|
121 |
if (httpProxyDict) {
|
122 |
axios_config.proxy = httpProxyDict;
|
123 |
}
|
|
|
124 |
const response = await axios(axios_config);
|
125 |
response.data.pipe(res);
|
126 |
} catch (error) {
|
|
|
121 |
if (httpProxyDict) {
|
122 |
axios_config.proxy = httpProxyDict;
|
123 |
}
|
124 |
+
console.log(`request to ${axios_config.url}`);
|
125 |
const response = await axios(axios_config);
|
126 |
response.data.pipe(res);
|
127 |
} catch (error) {
|