39 lines
1.0 KiB
Markdown
39 lines
1.0 KiB
Markdown
# Google Cloud & Vertex AI Authentication Setup for `trollagent_gear`
|
|
|
|
`trollagent_gear` connects to Google Cloud Vertex AI (or Google AI Studio) to query Gemini models (`gemini-2.5-flash`, `gemini-1.5-flash`, etc.) for tactical spatial navigation, obstacle avoidance, and health regeneration decisions.
|
|
|
|
---
|
|
|
|
## Quick Setup Options
|
|
|
|
### Option A: Application Default Credentials (ADC) - Recommended
|
|
```bash
|
|
# 1. Login with your Google Cloud account:
|
|
gcloud auth application-default login
|
|
|
|
# 2. Set your default project:
|
|
gcloud config set project YOUR_PROJECT_ID
|
|
export VERTEX_PROJECT_ID="YOUR_PROJECT_ID"
|
|
```
|
|
|
|
### Option B: Direct API Key (Google AI Studio or Vertex AI)
|
|
```bash
|
|
export GEMINI_API_KEY="AIzaSy..."
|
|
# Or:
|
|
export VERTEX_API_KEY="AIzaSy..."
|
|
```
|
|
|
|
### Option C: Service Account Key
|
|
```bash
|
|
export GOOGLE_APPLICATION_CREDENTIALS="/path/to/service-account.json"
|
|
export VERTEX_PROJECT_ID="YOUR_PROJECT_ID"
|
|
```
|
|
|
|
---
|
|
|
|
## Verifying Authentication
|
|
Run the auth check directly by starting the bot with `--help`:
|
|
```bash
|
|
python3 trollagent_gear/bot.py --help
|
|
```
|