This is a Flutter-based chat application that integrates with OpenAI's GPT-3.5 Turbo model to provide chatbot functionality.
- Chat interface with user and ChatGPT roles.
- Integration with OpenAI API for chat completions.
- Stream and non-stream chat request options.
- Animation effects for chat messages.
- Clear chat history option.
The app uses the following dependencies:
http
: For making API requests.vibration
: To provide haptic feedback.rxdart
: For reactive programming.envied
: For environment variable management.
This app uses the ENVied
package for managing environment variables. The OpenAI API key is stored in an .env
file and accessed through the Env
class in lib/env/env.dart
.
To set up your API key:
- Create a
.env
file in the root directory. - Add your OpenAI API key with the variable name
OPEN_AI_API_KEY
. For example:OPEN_AI_API_KEY=your_api_key_here
- Run the
build_runner
to generate the necessary code forENVied
.
This app was developed based on the teachings of Jaichang Park(Dreamwalker) from Fast Campus.