OraCatQAQ commited on
Commit
7184fb2
·
1 Parent(s): c1186e2
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -320,7 +320,7 @@ async def root():
320
  return {"message": "OpenAI API Proxy服务已启动 连接至DeepSider API"}
321
 
322
  @app.get("/v1/models")
323
- async def list_models():
324
  """列出可用的模型"""
325
  models = []
326
  for openai_model, _ in MODEL_MAPPING.items():
@@ -333,8 +333,7 @@ async def list_models():
333
 
334
  return {
335
  "object": "list",
336
- "data": models,
337
- "object": "list"
338
  }
339
 
340
  @app.post("/v1/chat/completions")
 
320
  return {"message": "OpenAI API Proxy服务已启动 连接至DeepSider API"}
321
 
322
  @app.get("/v1/models")
323
+ async def list_models(api_key: str = Depends(verify_api_key)):
324
  """列出可用的模型"""
325
  models = []
326
  for openai_model, _ in MODEL_MAPPING.items():
 
333
 
334
  return {
335
  "object": "list",
336
+ "data": models
 
337
  }
338
 
339
  @app.post("/v1/chat/completions")