iampawan / ChatGPT-Flutter-AIChatBot

A Chatbot chat app built using the Flutter framework and OpenAI's GPT-3 language model.
230 stars 99 forks source link

Unhandled Exception: Instance of 'FileNotFoundError' #8

Closed imakb4r closed 1 year ago

imakb4r commented 1 year ago

I put .env file in the project root.I run the project from VSCode and then get FileNotFoundError. I checked the .env file location hundred of times, tried to change the file name, change the location to /lib etc - still no luck. Any idea?

YagoVY commented 1 year ago

Hi Imakb4, You marked this as solved, can you explain how you did it please? I am stuck pretty much in the same...

imakb4r commented 1 year ago

HI YagoVY, You have to add .env file in your project to store your secret key. I follow this simple steps: https://www.geeksforgeeks.org/how-to-add-env-file-in-flutter/

Thanks