GithubHelp home page GithubHelp logo

andreban / gemini-rust Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 0.0 113 KB

A demo for using Google's Vertex API / Gemini demos in Rust via the REST API.

Home Page: https://cloud.google.com/vertex-ai/docs/reference/rest

Rust 100.00%
gemini gemini-pro rust vertex-ai

gemini-rust's Introduction

Vertex API / Gemini in Rust Rust

A port of the Vertex API Gemini demos by Mete Atamel to Rust.

Running the demos

  1. Enable the Vertex AI API in the Cloud Console.
  2. Install the Google Cloud SDK 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:

[env]
API_ENDPOINT="<api endpoint>"
PROJECT_ID="<project id>"
LOCATION_ID="<location id (also called region)"
  1. Run one of the demos:
  • 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>.

gemini-rust's People

Contributors

andreban avatar dependabot[bot] avatar

Stargazers

 avatar Bich Son Nhat avatar  avatar  avatar M Refi D.A avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.