iseehf commited on
Commit
78fa437
·
verified ·
1 Parent(s): 0e352ad

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +2 -2
index.js CHANGED
@@ -484,7 +484,7 @@ app.use(express.json({ limit: CONFIG.SERVER.BODY_LIMIT }));
484
  app.use(express.urlencoded({ extended: true, limit: CONFIG.SERVER.BODY_LIMIT }));
485
 
486
  // API 路由
487
- app.get('/hf/v1/models', (req, res) => {
488
  res.json({
489
  object: "list",
490
  data: Object.keys(CONFIG.MODELS).map(model => ({
@@ -496,7 +496,7 @@ app.get('/hf/v1/models', (req, res) => {
496
  });
497
  });
498
 
499
- app.post('/hf/v1/chat/completions', async (req, res) => {
500
  try {
501
  const authToken = req.headers.authorization?.replace('Bearer ', '');
502
  if (authToken !== CONFIG.API.API_KEY) {
 
484
  app.use(express.urlencoded({ extended: true, limit: CONFIG.SERVER.BODY_LIMIT }));
485
 
486
  // API 路由
487
+ app.get('/v1/models', (req, res) => {
488
  res.json({
489
  object: "list",
490
  data: Object.keys(CONFIG.MODELS).map(model => ({
 
496
  });
497
  });
498
 
499
+ app.post('/v1/chat/completions', async (req, res) => {
500
  try {
501
  const authToken = req.headers.authorization?.replace('Bearer ', '');
502
  if (authToken !== CONFIG.API.API_KEY) {