How to authenticate to Google Gemini Pro Vision AI, using Python SDK, and in-line credentials?

How to authenticate to Google Gemini Pro Vision AI, using Python SDK, and in-line credentials? 题意:如何使用 Python SDK 并通过内联凭据对 Google Gemini Pro Vision AI 进行身份验证?问题背景:I'm trying to use Google's Vertex Python SDK, but I don't want to lug acredentials.jsonfile 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)** 来定义凭据。Thefrom_service_account_filewants a file path.from_service_account_file方法只接受文件路径。Examp