Watch out! free version are too limited https://ai.google.dev/pricing
free limitation 2024/may
2 request per minute/50 request per day.
15 request per minute/1500 request per day.
This is Example Project not addon. As simply as possible, call the Gemini API.
update about pricing confirm Gemini 1.5 Flash ,just replace from "v1beta/models/gemini-1.5-pro-latest" to "v1beta/models/gemini-1.5-flash-latest"
add Gemini 1.5 Pro example 'chat_1_5'
This app requires an API key. Save it in settings.json. Take care of your keys. By default, it is added to .gitignore.
MIT LICENSE - Akihito Miyazaki
V1beta parts are not implemented yet. see https://ai.google.dev/tutorials/rest_quickstart
simple send text
show how to control safety.
send text with configuration (stopsequence ,temperature ..etc)
Send a text stream. This code uses HttpClient. I'm not familiar with this; please handle with care.
Send multiple-turn text.
Send an image and text. I tested mp4, but it's not working.
get single embedding
get multiple embedding and cmpare them.
count tokens
get model list and info.