https://github.com/andreban/gemini-rust
A demo for using Google's Vertex API / Gemini demos in Rust via the REST API.
https://github.com/andreban/gemini-rust
gemini gemini-pro rust vertex-ai
Last synced: 6 months ago
JSON representation
A demo for using Google's Vertex API / Gemini demos in Rust via the REST API.
- Host: GitHub
- URL: https://github.com/andreban/gemini-rust
- Owner: andreban
- Created: 2023-12-27T14:41:00.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-04-08T06:15:58.000Z (6 months ago)
- Last Synced: 2025-04-13T22:09:31.463Z (6 months ago)
- Topics: gemini, gemini-pro, rust, vertex-ai
- Language: Rust
- Homepage: https://cloud.google.com/vertex-ai/docs/reference/rest
- Size: 176 KB
- Stars: 12
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Vertex API / Gemini in Rust [](https://github.com/andreban/gemini-rust/actions/workflows/rust.yml)
A port of the [Vertex API][4] Gemini [demos by Mete Atamel][1] to Rust.
## Running the demos
1. Enable the Vertex AI API in the [Cloud Console][2].
2. Install the [Google Cloud SDK][3] is insalled and configured and that you are logged in into an account with the Vertex API enabled in the Cloud Console. You can use `gcloud auth login` to log in.
3. Ensure you have the following environment variables set:
- `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:
```toml
[env]
API_ENDPOINT=""
PROJECT_ID=""
LOCATION_ID="`.[1]: https://github.com/meteatamel/genai-samples/tree/main/vertexai/gemini/console/csharp/rest
[2]: https://console.cloud.google.com/apis/library/aiplatform.googleapis.com?q=vertex
[3]: https://cloud.google.com/sdk/?hl=en_US
[4]: https://cloud.google.com/vertex-ai/docs