bobocup commited on
Commit
36a095b
·
verified ·
1 Parent(s): 9129169

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -350,7 +350,9 @@ async def chat_completions(request: Request):
350
  raise HTTPException(status_code=500, detail=str(e))
351
 
352
  # 代理其他请求
353
-
 
 
354
  return await chat_completions(request)
355
 
356
  try:
 
350
  raise HTTPException(status_code=500, detail=str(e))
351
 
352
  # 代理其他请求
353
+ @app.api_route("/api/v1/{path:path}", methods=["GET", "POST", "PUT", "DELETE"])
354
+ async def proxy(path: str, request: Request):
355
+ if path == "chat/completions":
356
  return await chat_completions(request)
357
 
358
  try: