- Set your API Key inside the
.env.example
file :
OPEN_AI_API_KEY=<YOUR_KEY_HERE>
- if you're willing to change the environment variable name, then you should change it as well inside the
lib/env/env.dart
, otherwise if you're not changing it, pass directly to the next step. - Change
.env.example
file name to.env
. - Run
dart pub get
. - Run
dart run build_runner build
. - Run the
lib/main.dart
from your IDE, alternatively, Rundart run lib/main.dart
from your command line. - That's it, now run your main.dart and other dart files.