Chat Application with OpenAi
Running dart
on the backend side is still experimental work. If you encounter any issues, please let us know by creating a new GitHub issue.
The source code for this example is public on the following GitHub repository.
Welcome to our demo chat app integrated with Chat GPT, written in Flutter (frontend), Dart(backend), MongoDB as a database, and deployed with genezio.
This app allows users to engage in conversations with a chatbot powered by Chat GPT. This app is meant to be a demo for a technical talk on the topic of building full-stack apps with Dart and genezio.
Clone the example
- Run
git clone https://github.com/Genez-io/genezio-examples
- Navigate to the folder
cd ./genezio-examples/dart/chatbot-open-ai
Replicate this demo
Prerequisites:
- Get an OpenAI secret key. Create an account on the OpenAI platform and head to this link to add a secret key.
- Host a Mongo Database. Follow this tutorial to get a free tier database.
- Create a
server/.env
file and add the following environment variables:
OPENAPI_KEY=todo
MONGODB_URI=todo
If you want to deploy this demo and play around with it, follow these steps:
- Install genezio with
npm install -g genezio
- Login on the genezio platform:
genezio login
- Clone this repo:
git clone https://github.com/Genez-io/genezio-examples
- Head to the server directory and test it locally with:
genezio local
- When you are happy with the local version, deploy it on our infrastructure with:
genezio deploy
- Brag about it to your friends! You can share the frontend link to your friends and colleagues and let them play around with your new features.
Learn more
For more details on how to use genezio, check the links below:
For more details on each dart package, you can check out pub.dev