Skip to content

nomtek/flutter_ai_examples

Repository files navigation

Flutter AI Examples

Example app showcasing different usages of AI models.

List of examples

Examples using Mistral AI API through the MistralAI Client for Dart package:

Interactive Demo

Experience the capabilities of our AI examples live with our interactive demo. This demo allows you to explore the functionality of each example in real time through a web-based interface.

Launch Interactive Demo

To access the interactive demo, a Mistral AI API key is necessary. If you haven't acquired one yet, please sign up for a Mistral AI account and obtain your API key.

Getting Started

Install dependencies

flutter pub get

Generate code

dart run build_runner build -d 

Setup Mistral AI API key

Using environment variables

  1. Open the env.env file in the root project
  2. Replace your api key with your Mistral AI API key.

⚠️ This method is required if you want to change a book in the book search example.

Using the app settings

It's possible to change the key at runtime in the app settings.

App settings

Run the example app

Using the Visual Studio Code

We've prepared some ready to use launch configurations for VSC.

In most cases, you should choose the Run app (debug mode) configuration.

Using the terminal

You can either use the flutter run command directly

flutter run --dart-define-from-file=env.env

or use a script that contains the above snippet

Linux/MacOS
./tool/flutter_run.sh
Windows
tool\flutter_run.bat

You can pass parameters to the script by appending them at the end like this:

// Linux/MacOS
./tool/flutter_run.sh -d chrome

// Windows
tool\flutter_run.bat -d chrome

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published