wwardaww / gnome-gemini-ai

26 stars 7 forks source link

Gemini Ai Chat for Gnome (4+)

This Add-on is using gemini 1.0 pro model for chatting.

Using Gemini API Key

  1. Go to Google Ai and click the Get API key in Google AI studio
  2. On API key page you can create new api key for gemini
    1. Note: if you are planing to use vertex api choose create new project
  3. Copy the api key to addon settings
  4. All done!

Using Vertex API (ADVANCE)

Note that: Vertex api is a SaaS (paid service) from Google so you will pay your own queries and you should know theese:

Installing

  1. create billing information
  2. knowledge to gcloud-cli. ref: Install the gcloud CLI
  3. Shortcut for Auth: If you test the vertex api from you account it will generate Auth credential. ref:
  4. After the installization of gcloud-cli you need to login via: gcloud auth login
  5. Once you login via cli you need to follow theese steps (1-3) on your local: Vertex AI Gemini API Beginner Guide
  6. Finally you can create JWT key by: gcloud auth application-default print-access-token on terminal
    • Note: You need to create manually JWT, Once you set the key to Gemini API key on addon settings, the addon will automaticly create new JWT's when token was expired

Additional infos

Diffrence between Gemini API and Vertex API

Vertex has internet access and it can be search on internet but Gemini API has no internet accsess and model update date is (06-2023) so it can not react to recent events. Basicly Gemini is free but outdated, Vertex is paid, outated but it can search on internet when info isn't in the model.

Prices for Vertex API (03-2024)

GCP > Cloud AI and Industry Solutions > Vertex AI Model Garden > Language > Gemini > Gemini Pro

Per Unit 1K output: 0.00036$

Per Unit 1K input: 0.00012$

For reference: When I developed this addon, I sent 248 requests (it means 248 inputs and 248 outputs) and the cost was 0.019$.