ai  by flutter

AI chat widgets for Flutter applications

Created 1 year ago
253 stars

Top 99.4% on SourcePulse

GitHubView on GitHub
Project Summary

Adds AI chat functionality to Flutter applications via a set of reusable widgets. It targets Flutter developers seeking to integrate conversational AI features, offering a flexible architecture through an abstract LLM provider API and simplifying integration with Firebase AI. The toolkit enables rapid development of features like multi-turn chat, real-time streaming responses, rich text display, voice input, and multimedia attachments.

How It Works

The toolkit is built around an abstract LLMProvider API, allowing developers to easily swap different Large Language Model (LLM) backends. It ships with a concrete implementation for Firebase AI, specifically integrating with Google's Gemini models via the firebase_ai package. This design facilitates extensibility while providing a ready-to-use solution for common AI chat functionalities, including context management for multi-turn conversations and real-time response streaming.

Quick Start & Requirements

  • Installation: Add flutter_ai_toolkit, firebase_ai, and firebase_core to your pubspec.yaml.
  • Prerequisites: Requires Firebase project setup and configuration (firebase_options.dart). Device permissions are necessary for voice input (microphone access via package:record) and media attachments (file/image selection via package:file_selector and package:image_picker). Network access permissions are also required.
  • Configuration: Initialize Firebase in your main() function. Instantiate FirebaseProvider with a specific model (e.g., 'gemini-2.0-flash') and pass it to the LlmChatView widget.
  • Links: Vertex AI sample (implied by README).

Highlighted Details

  • Pluggable LLM Support: Implement a simple interface to integrate custom LLM providers beyond Firebase AI.
  • Cross-Platform: Compatible with Android, iOS, web, and macOS.
  • Rich Features: Supports multi-turn chat, streaming responses, rich text, voice input, and multimedia attachments.
  • Customization: Offers extensive styling options to match application design.

Maintenance & Community

The project encourages user feedback, issue logging, feature requests, and contributions to enhance its robustness and utility. Specific details on maintainers, community channels (like Discord/Slack), or roadmaps are not provided in the README.

Licensing & Compatibility

The README does not explicitly state the software license. This absence requires further investigation before adoption, especially concerning commercial use or integration into closed-source projects.

Limitations & Caveats

Version v0.9.8 introduced breaking changes, necessitating migration efforts for users on older versions, with migration notes available. The README does not detail specific performance benchmarks or known bugs.

Health Check
Last Commit

1 week ago

Responsiveness

Inactive

Pull Requests (30d)
3
Issues (30d)
0
Star History
7 stars in the last 30 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems") and Yaowei Zheng Yaowei Zheng(Author of LLaMA-Factory).

AstrBot by AstrBotDevs

3.8%
29k
LLM chatbot/framework for multiple platforms
Created 3 years ago
Updated 16 hours ago
Feedback? Help us improve.