geqintan commited on
Commit
2ea1675
·
1 Parent(s): 71c6544
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -45,8 +45,7 @@ GEMINI_BASE_URL = os.getenv("GEMINI_BASE_URL") # 从环境变量获取Gemini真
45
 
46
  # 2. 通用转发接口(匹配Gemini的/predict等端点,路径动态匹配)
47
  @app.api_route("/{path:path}", methods=["GET", "POST", "PUT", "DELETE"])
48
- # async def proxy_gemini(request: Request, path: str, proxy_api_key: str = Depends(verify_proxy_api_key)): # 添加代理认证依赖
49
- async def proxy_gemini(request: Request, path: str):
50
  # 拼接Gemini真实请求URL
51
  gemini_url = f"{GEMINI_BASE_URL}/{path}"
52
 
 
45
 
46
  # 2. 通用转发接口(匹配Gemini的/predict等端点,路径动态匹配)
47
  @app.api_route("/{path:path}", methods=["GET", "POST", "PUT", "DELETE"])
48
+ async def proxy_gemini(request: Request, path: str, proxy_api_key: str = Depends(verify_proxy_api_key)): # 添加代理认证依赖
 
49
  # 拼接Gemini真实请求URL
50
  gemini_url = f"{GEMINI_BASE_URL}/{path}"
51