generate_ai_dart 0.0.1 copy "generate_ai_dart: ^0.0.1" to clipboard
generate_ai_dart: ^0.0.1 copied to clipboard

dart package for gemini api

Google AI SDK for flutter #

The Google AI client SDK for flutter enables developers to use Google's state-of-the-art generative AI models (like Gemini) to build AI-powered features and applications. This SDK supports use cases like:

  • Generate text from text-only input
  • Generate text from text-and-images input (multimodal)
  • Build multi-turn conversations (chat)

For example, with just a few lines of code, you can access Gemini's multimodal capabilities to generate text from text-and-image input:

const key = "Your api key";

final config = generationConfig((builder) {
  builder.temperature = 0.7;
});
 final model = GenerativeModel(Model.geminiPro, key, generationConfig: config);
model.generateContentFromText("what is flutter ?").then((value) => print(value.text));

Try out the sample flutter app #

This repository contains a sample app demonstrating how the SDK can access and utilize the Gemini model for various use cases.

Installation and usage #

Add the dependency flutter pub add gemini_ai_dart) to your flutter project.

3
likes
120
points
31
downloads

Publisher

unverified uploader

Weekly Downloads

dart package for gemini api

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-2-Clause (license)

Dependencies

dio, flutter, image_compression_flutter, mutex, rxdart

More

Packages that depend on generate_ai_dart