A demo for using Google's Vertex API / Gemini demos in Rust via the REST API.
A port of the Vertex API Gemini demos by Mete Atamel to Rust.
gcloud auth login
to log in.API_ENDPOINT
: The endpoint of the Vertex AI API.PROJECT_ID
: The ID of the project to use.LOCATION_ID
: The ID of the location to use (also called region).Alternatively, create .cargo/config.toml
with the following content:
[env]
API_ENDPOINT="<api endpoint>"
PROJECT_ID="<project id>"
LOCATION_ID="<location id (also called region)"
generate-text-from-image-gcs
: Generates text from an image in Google Could Storage.generate-text-from-image-local
: Generate text from an local image.generate-text-from-text
: Generate text from text.Run with cargo run --bin <demo name>
.