From a05cf7b06909edf3b461bad5d3e4d784e21a34ba Mon Sep 17 00:00:00 2001 From: "shuohigh@gmail.com" Date: Tue, 17 Jun 2025 18:32:47 +0800 Subject: [PATCH] =?UTF-8?q?Google=20Vertex=20AI=E7=9A=84access=20token?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E6=8E=A5=E5=8F=A3=E8=A1=A5=E4=B8=8A=E8=AF=B4?= =?UTF-8?q?=E6=98=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/BowongModalFunctions/router/google.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/BowongModalFunctions/router/google.py b/src/BowongModalFunctions/router/google.py index fb6775e..7569cdb 100644 --- a/src/BowongModalFunctions/router/google.py +++ b/src/BowongModalFunctions/router/google.py @@ -138,8 +138,11 @@ async def list_files(headers: Annotated[GoogleAPIKeyHeaders, Header()]): return JSONResponse(content=response.json() if len(response.text) > 0 else "", status_code=response.status_code) -@router.get('/access-token', summary="获取一个新的Google Access Token", dependencies=[Depends(verify_token)]) +@router.get('/access-token', summary="获取一个新的Google Access Token", + description="获取的Access Token最多同时存在35000个", + dependencies=[Depends(verify_token)]) async def get_access_token() -> GoogleAuthUtils.GoogleAuthResponse: + # GOOGLE_AUTH_JSON 通过modal secrets 配置 service_account_json = os.environ.get("GOOGLE_AUTH_JSON", None) if not service_account_json: raise HTTPException(status_code=status.HTTP_401_UNAUTHORIZED, detail="Missing Google IAM Service Account JSON")