Skip to content

A Flutter project which communicates with OpenAI API

License

Notifications You must be signed in to change notification settings

hahastudio/FlutterChat

Repository files navigation

Flutter Chat

A new Flutter project which communicates with OpenAI API.

Screenshots

Screenshot 1 Screenshot 2 Screenshot 3 Screenshot 4

Screenshot tablet 1

Features

  • Support requesting organization
  • Support system message
  • Support streaming message like ChatGPT
  • Support to choose GPT models (gpt-3.5-turbo, gpt-4, gpt-4-32k)
  • Support to limit the count of conversation history when sending
  • Support to show token usage in real time
  • Support customized API Host
  • Support tablet view

How to use

  1. Get OpenAI API Key
  2. Tap setting button on top right corner to set API Key (required) and Organization (optional)
  3. Add a new conversation
  4. Chat with OpenAI

Architecture

It uses Flutter framework, and uses BLoC pattern to implement state management.

How to build

Get Flutter package:

flutter pub get

Build apk:

flutter build apk

NOTE: It may take quite long time to finish build. On my MacBook Pro, it takes about 1 hour to finish.

References

Mainly used Flutter packages:

License

Distributed under the MIT License. See LICENSE for more information.