tianlong12 commited on
Commit
07a1a55
·
verified ·
1 Parent(s): 924c672

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -12,7 +12,7 @@ def index():
12
  def forward_to_target(subpath):
13
  try:
14
  # 构建目标 URL
15
- target_url = f'http://{subpath}'
16
 
17
  # 获取请求数据
18
  data = request.json
@@ -24,7 +24,7 @@ def forward_to_target(subpath):
24
  return jsonify({"error": "Unauthorized"}), 401
25
 
26
  api_key = auth_header.split(" ")[1]
27
- target_url = f"http://{subpath.split('/')[0]}"
28
 
29
  model = data['model']
30
  messages = data['messages']
 
12
  def forward_to_target(subpath):
13
  try:
14
  # 构建目标 URL
15
+ target_url = f'https://{subpath}'
16
 
17
  # 获取请求数据
18
  data = request.json
 
24
  return jsonify({"error": "Unauthorized"}), 401
25
 
26
  api_key = auth_header.split(" ")[1]
27
+ target_url = f"https://{subpath.split('/')[0]}"
28
 
29
  model = data['model']
30
  messages = data['messages']