sonygod commited on
Commit
392a723
·
1 Parent(s): 4a31343
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -635,7 +635,8 @@ def normal_response(question, session_id, messages, request_model, actual_model)
635
  }
636
  return response
637
 
638
- @app.route("/hf/v1/models", methods=["GET"])
 
639
  def list_models():
640
  models = []
641
  for model_id, _ in MODEL_MAPPING.items():
@@ -651,7 +652,8 @@ def list_models():
651
  "data": models
652
  }
653
 
654
- @app.route("/hf/v1/chat/completions", methods=["POST"])
 
655
  def chat_completions():
656
  # API Key 验证
657
  if not verify_api_key():
 
635
  }
636
  return response
637
 
638
+ #@app.route("/hf/v1/models", methods=["GET"])
639
+ @app.get("/hf/v1/models")
640
  def list_models():
641
  models = []
642
  for model_id, _ in MODEL_MAPPING.items():
 
652
  "data": models
653
  }
654
 
655
+ #@app.route("/hf/v1/chat/completions", methods=["POST"])
656
+ @app.post("/hf/v1/chat/completions")
657
  def chat_completions():
658
  # API Key 验证
659
  if not verify_api_key():