Documentation
¶
Overview ¶
Google Cloud Vertex AI example for Chronos.
Vertex AI exposes an OpenAI-compatible endpoint (public preview) that Chronos can drive through NewOpenAICompatibleWithConfig. Auth uses a short-lived GCP access token (Bearer) rather than a static API key.
Prerequisites:
- A GCP project with Vertex AI API enabled
- `gcloud auth application-default login` (or a workload-identity token)
- Go 1.24+
Set the following environment variables before running:
export GOOGLE_CLOUD_PROJECT=<your-gcp-project-id> export GOOGLE_CLOUD_LOCATION=us-central1 export VERTEX_MODEL=google/gemini-2.5-pro export GOOGLE_ACCESS_TOKEN=$(gcloud auth print-access-token)
Run:
go run ./examples/vertex/main.go go run ./examples/vertex/main.go -stream
Click to show internal directories.
Click to hide internal directories.