Spaces:
Paused
Paused
Update index.js
Browse files
index.js
CHANGED
|
@@ -733,7 +733,7 @@ app.use(cors({
|
|
| 733 |
allowedHeaders: ['Content-Type', 'Authorization']
|
| 734 |
}));
|
| 735 |
|
| 736 |
-
app.get('/v1/models', (req, res) => {
|
| 737 |
res.json({
|
| 738 |
object: "list",
|
| 739 |
data: Object.keys(CONFIG.MODELS).map((model, index) => ({
|
|
@@ -746,7 +746,7 @@ app.get('/v1/models', (req, res) => {
|
|
| 746 |
});
|
| 747 |
|
| 748 |
|
| 749 |
-
app.post('/v1/chat/completions', async (req, res) => {
|
| 750 |
try {
|
| 751 |
const authToken = req.headers.authorization?.replace('Bearer ', '');
|
| 752 |
if (authToken !== CONFIG.API.API_KEY) {
|
|
|
|
| 733 |
allowedHeaders: ['Content-Type', 'Authorization']
|
| 734 |
}));
|
| 735 |
|
| 736 |
+
app.get('/hf/v1/models', (req, res) => {
|
| 737 |
res.json({
|
| 738 |
object: "list",
|
| 739 |
data: Object.keys(CONFIG.MODELS).map((model, index) => ({
|
|
|
|
| 746 |
});
|
| 747 |
|
| 748 |
|
| 749 |
+
app.post('/hf/v1/chat/completions', async (req, res) => {
|
| 750 |
try {
|
| 751 |
const authToken = req.headers.authorization?.replace('Bearer ', '');
|
| 752 |
if (authToken !== CONFIG.API.API_KEY) {
|