Update app.js
Browse files
app.js
CHANGED
@@ -147,7 +147,7 @@ app.get('/', (req, res) => {
|
|
147 |
});
|
148 |
});
|
149 |
|
150 |
-
app.
|
151 |
const authHeader = req.headers['authorization'];
|
152 |
if (!authHeader || !authHeader.startsWith('Bearer ') || authHeader.slice(7) !== AUTH_KEY) {
|
153 |
return res.status(401).json({ error: 'Unauthorized' });
|
@@ -163,7 +163,7 @@ app.post('/ai/v1/models', (req, res) => {
|
|
163 |
}))
|
164 |
});
|
165 |
|
166 |
-
console.log(`${new Date().toISOString()} - ${req.ip || req.connection.remoteAddress} - /ai/v1/models - 200`);
|
167 |
});
|
168 |
|
169 |
app.post('/ai/v1/chat/completions', async (req, res) => {
|
|
|
147 |
});
|
148 |
});
|
149 |
|
150 |
+
app.get('/ai/v1/models', (req, res) => {
|
151 |
const authHeader = req.headers['authorization'];
|
152 |
if (!authHeader || !authHeader.startsWith('Bearer ') || authHeader.slice(7) !== AUTH_KEY) {
|
153 |
return res.status(401).json({ error: 'Unauthorized' });
|
|
|
163 |
}))
|
164 |
});
|
165 |
|
166 |
+
console.log(`${new Date().toISOString()} - ${req.ip || req.connection.remoteAddress} - GET /ai/v1/models - 200`);
|
167 |
});
|
168 |
|
169 |
app.post('/ai/v1/chat/completions', async (req, res) => {
|