99i commited on
Commit
4742f7e
·
verified ·
1 Parent(s): e8426cb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -180,12 +180,9 @@ async def embeddings(request: Request):
180
  async def models(request: Request):
181
  """转发 models 请求."""
182
  """通用的请求转发函数."""
183
- body = await request.json()
184
- key = get_api_key()
185
- if not key:
186
- raise HTTPException(status_code=400, detail="No valid API key available.")
187
  headers = {"Authorization": f"Bearer {key}"}
188
- async with httpx.AsyncClient(timeout=REQUEST_TIMEOUT) as client:
189
  response = await client.get(
190
  "https://api.siliconflow.cn/v1/models", headers=headers
191
  )
 
180
  async def models(request: Request):
181
  """转发 models 请求."""
182
  """通用的请求转发函数."""
183
+ key="sk-aastfpzsnogprzmmbbxompjaukefeotxrrkcrztiyocrosqa"
 
 
 
184
  headers = {"Authorization": f"Bearer {key}"}
185
+ async with httpx.AsyncClient() as client:
186
  response = await client.get(
187
  "https://api.siliconflow.cn/v1/models", headers=headers
188
  )