google_gemini 0.0.7
google_gemini: ^0.0.7 copied to clipboard
Google Gemini SDK for Flutter
Google DeepMind Gemini #
Google Gemini is a set of cutting-edge large language models (LLMs) designed to be the driving force behind Google's future AI initiatives.

This package provides a powerful bridge between your Flutter application and Google's revolutionary Gemini AI. It empowers you to seamlessly integrate Gemini's capabilities into your app, unlocking a world of possibilities for building innovative, intelligent, and engaging experiences that redefine user interaction.
Features #
Getting started #
To get the API key you have to create a Gemini account on the ai.google.dev. Once you have to Gemini API key, you are ready to start building.
Create Gemini Instance #
final gemini = GoogleGemini(
apiKey: "--- Your Gemini Api Key --- ",
);
Generate content #
With Gemini you use both text and image data for prompting, depending on what model variation you use.
For example, you can generate text using text prompt with the gemini-pro model and use both text and image data to prompt the gemini-pro-vision model
Text only input #
This feature lets you perform natural language processing (NLP) tasks such as text completion and summarization.
gemini.generateFromText("Tell me a story")
.then((value) => print(value.text))
.catchError((e) => print(e));

Text and image input #
You can send a text prompt with an image to the gemini-pro-vision model to perform a vision related task. For example, captioning an image or identifying what's in an image.
File image = File("assets/images.png")
gemini.generateFromTextAndImages(
query: "What is this picture?",
image: image
)
.then((value) => print(value.text))
.catchError((e) => print(e));

Build multi-turn conversations #
// In progress
Use streaming for faster interactions #
// In progress
Gemini Response #
// In progress
Gemini Methods #
// In progress