Spaces:
Sleeping
Sleeping
update
Browse files
app.py
CHANGED
|
@@ -68,12 +68,12 @@ async def proxy_gemini(request: Request, protocol: ProtocolType, host:str, path:
|
|
| 68 |
|
| 69 |
# 移除FastAPI自带的Host头,避免Gemini校验报错
|
| 70 |
client_headers.pop("host", None)
|
| 71 |
-
|
| 72 |
# 将User-Agent改为curl/8.7.1,以模拟curl请求
|
| 73 |
client_headers["User-Agent"] = "curl/8.7.1"
|
| 74 |
|
| 75 |
# 获取API密钥信息
|
| 76 |
-
api_key_info = await get_api_key_info()
|
| 77 |
|
| 78 |
return api_key_info
|
| 79 |
|
|
|
|
| 68 |
|
| 69 |
# 移除FastAPI自带的Host头,避免Gemini校验报错
|
| 70 |
client_headers.pop("host", None)
|
| 71 |
+
|
| 72 |
# 将User-Agent改为curl/8.7.1,以模拟curl请求
|
| 73 |
client_headers["User-Agent"] = "curl/8.7.1"
|
| 74 |
|
| 75 |
# 获取API密钥信息
|
| 76 |
+
api_key_info = await get_api_key_info('gemini-2.5-flash')
|
| 77 |
|
| 78 |
return api_key_info
|
| 79 |
|