题意:
如何使用 Python SDK 并通过内联凭据对 Google Gemini Pro Vision AI 进行身份验证?
问题背景:
I\’m trying to use Google\’s Vertex Python SDK, but I don\’t want to lug a credentials.json file around. I\’d rather store the secret parts of the file in a Key Vault and insert at runtime. But I can\’t find a simple way to use an in-line dict to define the credential.
我正在尝试使用 Google 的 Vertex Python SDK,但不想随身携带 credentials.json 文件。我更希望把文件中的密钥信息存放在密钥保管库(Key Vault)中,并在运行时注入。但我找不到一种简单的方法,用 ** 内联字典(in-line dict)** 来定义凭据。
The from_service_account_file wants a file path.
from_service_account_file 方法只接受文件路径。
Examp


