bufe commited on
Commit
298d276
·
verified ·
1 Parent(s): 6149ad2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -491,7 +491,7 @@ def index():
491
 
492
  return jsonify({"rpm": rpm, "tpm": tpm, "rpd": rpd, "tpd": tpd})
493
 
494
- @app.route('/handsome/v1/models', methods=['GET'])
495
  def list_models():
496
  if not check_authorization(request):
497
  return jsonify({"error": "Unauthorized"}), 401
@@ -541,7 +541,7 @@ def list_models():
541
  "data": detailed_models
542
  })
543
 
544
- @app.route('/handsome/v1/dashboard/billing/usage', methods=['GET'])
545
  def billing_usage():
546
  if not check_authorization(request):
547
  return jsonify({"error": "Unauthorized"}), 401
@@ -554,7 +554,7 @@ def billing_usage():
554
  "total_usage": 0
555
  })
556
 
557
- @app.route('/handsome/v1/dashboard/billing/subscription', methods=['GET'])
558
  def billing_subscription():
559
  if not check_authorization(request):
560
  return jsonify({"error": "Unauthorized"}), 401
@@ -588,8 +588,8 @@ def billing_subscription():
588
  "system_hard_limit_usd": total_balance
589
  })
590
 
591
- @app.route('/handsome/v1/embeddings', methods=['POST'])
592
- def handsome_embeddings():
593
  if not check_authorization(request):
594
  return jsonify({"error": "Unauthorized"}), 401
595
 
@@ -669,8 +669,8 @@ def handsome_embeddings():
669
  except requests.exceptions.RequestException as e:
670
  return jsonify({"error": str(e)}), 500
671
 
672
- @app.route('/handsome/v1/images/generations', methods=['POST'])
673
- def handsome_images_generations():
674
  if not check_authorization(request):
675
  return jsonify({"error": "Unauthorized"}), 401
676
 
@@ -779,8 +779,8 @@ def handsome_images_generations():
779
  else:
780
  return jsonify({"error": "Unsupported model"}), 400
781
 
782
- @app.route('/handsome/v1/chat/completions', methods=['POST'])
783
- def handsome_chat_completions():
784
  if not check_authorization(request):
785
  return jsonify({"error": "Unauthorized"}), 401
786
 
 
491
 
492
  return jsonify({"rpm": rpm, "tpm": tpm, "rpd": rpd, "tpd": tpd})
493
 
494
+ @app.route('/ai/v1/models', methods=['GET'])
495
  def list_models():
496
  if not check_authorization(request):
497
  return jsonify({"error": "Unauthorized"}), 401
 
541
  "data": detailed_models
542
  })
543
 
544
+ @app.route('/ai/v1/dashboard/billing/usage', methods=['GET'])
545
  def billing_usage():
546
  if not check_authorization(request):
547
  return jsonify({"error": "Unauthorized"}), 401
 
554
  "total_usage": 0
555
  })
556
 
557
+ @app.route('/ai/v1/dashboard/billing/subscription', methods=['GET'])
558
  def billing_subscription():
559
  if not check_authorization(request):
560
  return jsonify({"error": "Unauthorized"}), 401
 
588
  "system_hard_limit_usd": total_balance
589
  })
590
 
591
+ @app.route('/ai/v1/embeddings', methods=['POST'])
592
+ def ai_embeddings():
593
  if not check_authorization(request):
594
  return jsonify({"error": "Unauthorized"}), 401
595
 
 
669
  except requests.exceptions.RequestException as e:
670
  return jsonify({"error": str(e)}), 500
671
 
672
+ @app.route('/ai/v1/images/generations', methods=['POST'])
673
+ def ai_images_generations():
674
  if not check_authorization(request):
675
  return jsonify({"error": "Unauthorized"}), 401
676
 
 
779
  else:
780
  return jsonify({"error": "Unsupported model"}), 400
781
 
782
+ @app.route('/ai/v1/chat/completions', methods=['POST'])
783
+ def ai_chat_completions():
784
  if not check_authorization(request):
785
  return jsonify({"error": "Unauthorized"}), 401
786