Ever come home from a long day of coding and think, "What's for dinner?" Well, now you can ask your AI assistant! This project is an AI assistant that can help you decide what to make for dinner.
Upload a picture of the inside of your refrigerator and the AI assistant will tell you what you can make with the ingredients you have. Make sure you take a clear picture of the inside of your refrigerator so the AI assistant can accurately identify the ingredients you have.
(This project was made for the Hashnode AI for Tomorrow Hackathon).
The assistant is built using OpenAI's GPT-4o model for image analysis and recipe list generation. It uses Couchbase Capella to store the recipe data and the Couchbase Ruby SDK and Couchbase Ruby ORM for data interaction.
- Clone the repository:
git clone https://github.com/hummusonrails/whats-for-dinner-ai-assistant.git
- Install the dependencies:
bundle install
- Define the following environment variables in the
.env
file:
OPENAI_API_KEY=
COUCHBASE_URL=
COUCHBASE_BUCKET=
COUCHBASE_USER=
COUCHBASE_PASSWORD=
NGROK_URL=
- Start the server:
bundle exec rails s
- Start ngrok:
ngrok http 3000
OPENAI_API_KEY
: Your OpenAI API key. You can get this by signing up for an account on the OpenAI platform and creating a new API key.COUCHBASE_URL
: Your Couchbase cluster connection string. This can be found by navigating to theConnect
tab in the Capella dashboard.COUCHBASE_BUCKET
: The name of the bucket where the recipe data is stored. This is defined by you at the time you create your bucket.COUCHBASE_USER
: The username for your Couchbase cluster. This can be found by navigating to theAccess Credentials
section in the Capella dashboard.COUCHBASE_PASSWORD
: The password for your Couchbase cluster. This can be found by navigating to theAccess Credentials
section in the Capella dashboard.NGROK_URL
: The ngrok URL that you get after runningngrok http 3000
. ngrok is a tool that allows you to expose your local server to the internet, which is necessary to send the image to OpenAI for analysis.
This project is licensed under the MIT License. See the LICENSE for more information.
Contributions are welcome! Please see the CODE_OF_CONDUCT.md file for more information on the expected behavior of the community in this project.