A new Flutter project which communicates with OpenAI API.
- Support requesting organization
- Support system message
- Support streaming message like ChatGPT
- Support to choose GPT models (gpt-3.5-turbo, gpt-3.5-turbo-16k, 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
- Get OpenAI API Key
- Tap setting button on top right corner to set API Key (required) and Organization (optional)
- Add a new conversation
- Chat with OpenAI
It uses Flutter framework, and uses BLoC pattern to implement state management.
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.
Mainly used Flutter packages:
- shared_preferences to store app settings & conversations
- flutter_bloc for state management
- settings_ui for setting screen
- flutter_markdown to render messages in markdown format
- Unofficial tiktoken to calculate token usage
Distributed under the MIT License. See LICENSE for more information.