Spaces:
Sleeping
Sleeping
Update index.js
Browse files
index.js
CHANGED
@@ -787,7 +787,7 @@ app.use(cors({
|
|
787 |
allowedHeaders: ['Content-Type', 'Authorization']
|
788 |
}));
|
789 |
|
790 |
-
app.get('/v1/models', (req, res) => {
|
791 |
res.json({
|
792 |
object: "list",
|
793 |
data: Object.keys(CONFIG.MODELS).map((model, index) => ({
|
@@ -800,7 +800,7 @@ app.get('/v1/models', (req, res) => {
|
|
800 |
});
|
801 |
|
802 |
|
803 |
-
app.post('/v1/chat/completions', async (req, res) => {
|
804 |
try {
|
805 |
const authToken = req.headers.authorization?.replace('Bearer ', '');
|
806 |
if (CONFIG.API.IS_CUSTOM_SSO) {
|
|
|
787 |
allowedHeaders: ['Content-Type', 'Authorization']
|
788 |
}));
|
789 |
|
790 |
+
app.get('/hf/v1/models', (req, res) => {
|
791 |
res.json({
|
792 |
object: "list",
|
793 |
data: Object.keys(CONFIG.MODELS).map((model, index) => ({
|
|
|
800 |
});
|
801 |
|
802 |
|
803 |
+
app.post('/hf/v1/chat/completions', async (req, res) => {
|
804 |
try {
|
805 |
const authToken = req.headers.authorization?.replace('Bearer ', '');
|
806 |
if (CONFIG.API.IS_CUSTOM_SSO) {
|