yxmiler commited on
Commit
b46b80c
·
verified ·
1 Parent(s): 17dc578

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +2 -2
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) {