You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added support for Application Default Credentials (ADC). This enables more secure authentication when running on Google Cloud environments like GKE or GCE, without the need to manage API keys.
6
+
7
+
To use ADC:
8
+
1. Install the google-auth-library package
9
+
2. Initialize the SDK with `new GoogleGenerativeAI(undefined, { useAdc: true })`
10
+
3. Set up ADC through gcloud CLI or service account credentials
constprompt="Does this look store-bought or homemade?";
@@ -59,6 +61,30 @@ const result = await model.generateContent([prompt, image]);
59
61
console.log(result.response.text());
60
62
```
61
63
64
+
### Using Application Default Credentials (ADC)
65
+
66
+
For improved security when running on Google Cloud environments (GKE, GCE, etc.) or for local development, you can use Application Default Credentials (ADC) instead of API keys:
0 commit comments