Skip to content

GetStream/generative_ai_with_flutter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blog-Using Generative AI with Flutter-2400x1350px

Generative AI with Flutter demonstrates Google's Generative AI on Flutter with Stream Chat SDK for Flutter.

The purpose of this repository is to demonstrate below:

  • Demonstrates Gemini API for Flutter.
  • Integrating chat systems with Stream Chat Flutter SDK for real-time event handling.
  • Examples for all current capabilities of the google_generative_ai package.

✍️ Technical Content

If you're interested in knowing more about Google's Generative AI SDK, check out the following blog post: Generative AI with Flutter

🛥 Stream Chat & Video SDK

Generative AI with Flutter is built with Stream Chat SDK for Flutter to implement messaging systems. If you’re interested in building powerful real-time video/audio calling, audio room, and livestreaming, check out the Stream Video SDK for Flutter!

Stream Chat

Stream Video

💻 How to build the project?

To build this project properly, you should follow the instructions below:

  1. Go to the Stream login page.
  2. If you have your GitHub account, click the SIGN UP WITH GITHUB button and you can sign up within a couple of seconds.

stream

  1. If you don't have a GitHub account, fill in the inputs and click the START FREE TRIAL button.
  2. Go to the Dashboard and click the Create App button like the below.

stream

  1. Fill in the blanks like the below and click the Create App button.

  1. You will see the Key like the image below and then copy it.

stream

  1. Add the key you just retrieved to the lib/data/config.dart file:
class GenAIConfig {
  static String streamApiKey = "YOUR_STREAM_API_KEY";
  // ...
}
  1. Go to your Dashboard again and click your App.

  2. In the Overview menu, you can find the Authentication category by scrolling to the middle of the page.

  3. Switch on the Disable Auth Checks option and click the Submit button like the image below.

stream

  1. Click the Explorer tab on the left side menu.

  2. Click users -> Create New User button sequentially and add fill in the user like the below:

  • User Name: gemini
  • User ID: gemini
  1. Go to Google AI Studio, login with your Google account and select the Get API key on the menu left like the image below:

gemini

  1. Create your API key for using generative AI SDKs, and you'll get one like the image below:

gemini

  1. Add the second key you just retrieved to the lib/data/config.dart file:
class GenAIConfig {
  // ...
  static String geminiApiKey = "YOUR_GEMINI_API_KEY";
}
  1. Build and run the project.

About

✨ Generative AI with Flutter demonstrates Google's Generative AI on Flutter with the Stream Chat Flutter SDK.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published