#generative-ai #ai #ai-api #google #gemini #generative #client

google-generative-ai-rs

An unofficial rust-based client library to interact with the Google Gemini generative AI API

17 releases

0.3.4 Dec 23, 2024
0.3.3 Dec 21, 2024
0.3.2 May 28, 2024
0.2.5 May 4, 2024
0.1.4 Dec 30, 2023

#378 in Web programming

Download history 4/week @ 2024-09-11 44/week @ 2024-09-18 75/week @ 2024-09-25 19/week @ 2024-10-02 18/week @ 2024-10-09 31/week @ 2024-10-16 22/week @ 2024-10-23 30/week @ 2024-10-30 52/week @ 2024-11-06 58/week @ 2024-11-13 11/week @ 2024-11-20 22/week @ 2024-11-27 50/week @ 2024-12-04 89/week @ 2024-12-11 336/week @ 2024-12-18 89/week @ 2024-12-25

566 downloads per month
Used in nuttx-pr-bot

MIT license

51KB
975 lines

Google Generative AI API client (unofficial)

Rust Check An unofficial rust-based client library to interact with the Google generative AI API.

The goal is to emulate the Google AI Python SDK but in Rust.

Usage

Start point, gain familiarity with Google's Gemini generative AI.

See examples and follow the in-comment instructions. The code is (hopefully) easy and readable.

Contributing

Yes, please!! Create a fork and branch, make your contribution, and raise a PR.

Please see contributing for the rules; they are standard though.

Work status

google-generative-ai-rs = { version = "0.3.4", features = ["beta"] }

Using the beta feature will enable the following:

  • gemini-1.5-pro-latest
  • gemini-1.0-pro
  • gemini-1.5-pro-latest")
  • gemini-1.5-flash")
  • "gemini-1.5-flash-8b")
  • gemini-2.0-flash-exp")
  • or custom Model::Custom(name)
  • system instructions
  • json_mode

Note: gemini-1.0-pro is deprecated and will be unavailable from 15th February 2025.

I do my best to release working code.

Status today is: "Happy path for both public and Vertex AI endpoints work for Gemini."

Outline tasks

Dependencies

~19–32MB
~575K SLoC