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

google-generative-ai-rs

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

13 releases

0.3.0 May 4, 2024
0.2.5 May 4, 2024
0.2.4 Mar 18, 2024
0.2.3 Feb 11, 2024
0.1.4 Dec 30, 2023

#144 in Machine learning

Download history 1/week @ 2024-01-20 2/week @ 2024-02-03 2/week @ 2024-02-10 49/week @ 2024-02-17 48/week @ 2024-02-24 37/week @ 2024-03-02 28/week @ 2024-03-09 139/week @ 2024-03-16 10/week @ 2024-03-23 85/week @ 2024-03-30 29/week @ 2024-04-06 20/week @ 2024-04-13 31/week @ 2024-04-20 9/week @ 2024-04-27 315/week @ 2024-05-04

376 downloads per month

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–37MB
~678K SLoC