Skip to content

Commit a506b94

Browse files
matthew29tangcopybara-github
authored andcommitted
fix: Fix auth scope for RAG upload_file
PiperOrigin-RevId: 776202107
1 parent 4202177 commit a506b94

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

vertexai/preview/rag/rag_data.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,9 @@ def upload_file(
465465
"metadata": (None, str(js_rag_file)),
466466
"file": open(path, "rb"),
467467
}
468-
credentials, _ = auth.default()
468+
credentials, _ = auth.default(
469+
scopes=["https://www.googleapis.com/auth/cloud-platform"]
470+
)
469471
authorized_session = google_auth_requests.AuthorizedSession(credentials=credentials)
470472
try:
471473
response = authorized_session.post(

0 commit comments

Comments
 (0)