Explore the potential of OpenAI models with our repository of examples showcasing use cases. Our examples highlight the diverse ways in which OpenAI models can be applied. Discover the limitations and benefits of these models and how they can be used to solve real-world problems.
Create .env
file in the root of repository and add a single key-value pair with OPENAI_TOKEN
as a key and your OpenAI token as a value:
OPENAI_TOKEN="YOUR_OPENAI_TOKEN"
Then, generate environment files using build_runner
:
flutter pub run build_runner build
After that, run the project on any available platform 🎉
flutter run
The project has a few demonstrations of OpenAI usages in mobile applications.
Project uses:
envied
for local secrets management.get_it
for dependency management.flutter_bloc
for state management.openai_client
for OpenAI API (doc) interactions.
In addition to basic localization feature, the application has an ability to change the OpenAI text model, that will be used across the app.
This page demostrates an ability to create a simple chat to interact with user.
It is possible to send a message and get a response from OpenAI bot.
Application is not sending a full conversation to OpenAI, so that the text model is not aware of the context of the conversation.
This page demostrates an ability to create a unique motivational message for the user.
It is possible to generate motivational text and copy it to the clipboard.
Such messages might be used is a certain place on user dashboard in real applications.
This demo is language-dependent, meaning that application is asking OpenAI text model to respond using the language that is currently used in application.