AI Generator
Last updated
Last updated
We added feature for AI chatbot and Image generator in recent version. To use this feature, you need to enable the AI option from your backend and add the Open AI Api key to your app for this feature to work.
Login to the backend and click on the Settings menu
On the settings page, click on App Settings
On the App Settings page, scroll down to the AI Settings. Enable the ai feature you want, either AI Chat or AI Image Generator or both option.
then save the settings.
You need to get API key from your openAI bashboard. Checkout the link below on how to get your api key: https://www.howtogeek.com/885918/how-to-get-an-openai-api-key/
You need to set your api key in the mobile app source code for the ai feature to work on the mobile app.
Create a .env file in the root of the flutter app folder. If there is a .env file in the root folder already then no need in create any one.
Open the .env file in the flutter app code.
Add a key name OPENAI_API_KEY and set your api key in there. Example below:
OPENAI_API_KEY="sk-7sdsdsdC"
save the .env file
Now, you need to run a command to so the app is aware of the new key you just set. The command is as stated below:
After the command has finished successfully, you can now run your app with no issue.
When modifying the .env
file, the generator might not pick up the change, if that happens simply clean the build cache and run the generator again.