#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

15 releases

0.3.2 May 28, 2024
0.3.1 May 28, 2024
0.2.5 May 4, 2024
0.2.4 Mar 18, 2024
0.1.4 Dec 30, 2023

#946 in Web programming

Download history 4/week @ 2024-07-29 39/week @ 2024-08-05 52/week @ 2024-08-12 36/week @ 2024-08-19 75/week @ 2024-08-26 5/week @ 2024-09-02 13/week @ 2024-09-16 97/week @ 2024-09-23 30/week @ 2024-09-30 10/week @ 2024-10-07 31/week @ 2024-10-14 20/week @ 2024-10-21 32/week @ 2024-10-28 56/week @ 2024-11-04 61/week @ 2024-11-11

174 downloads per month
Used in nuttx-pr-bot

MIT license

48KB
922 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.

The initial focus will be on the newer Gemini models, but the more stable and mature models will hopefully also be supported soon.

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

Potentially Breaking Changes

Version 0.3.0 may lead to breaking changes. This version adds in some beta features and I have now added a feature flag to enable these.

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

Using the beta feature will enable the following:

  • gemini-1.5-pro-latest
  • system instructions
  • json_mode

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
~588K SLoC