Skip to content

RasoiGuru is your ultimate cooking assistant chatbot, offering detailed recipes, ingredient substitutions, and personalized culinary tips. 🍳 Built with FastAPI and deployed on AWS, it ensures seamless integration, robust performance, and scalability. 🚀

License

Notifications You must be signed in to change notification settings

Deepmalya-Rakshit/RasoiGuru

Repository files navigation


Logo

RasoiGuru

Ultimate culinary companion offering expert cooking guidance and ingredient tips seamlessly
View Demo · Report Bug · Request Feature

Table of Contents

  1. Project Overview
  2. Project Demo
  3. Architecture
  4. Required API Keys
  5. Project Setup
  6. Deployment on AWS
  7. Dependencies
  8. Author

Project Overview

RasoiGuru is your ultimate cooking assistant chatbot, designed to offer detailed cooking instructions, ingredient substitutions, and personalized culinary tips to elevate your kitchen skills.

It uses Retrieval-Augmented Generation (RAG) from multiple data sources like professional cookbook PDFs and Wikipedia. This combination ensures that the chatbot provides accurate and comprehensive culinary information.

The application is converted to an API using FastAPI, allowing seamless integration and access to RasoiGuru's capabilities through a user-friendly interface. It has robust logging and exception handling mechanisms to ensure smooth operation and error detection. Additionally, a setup module is implemented to streamline the installation process and manage dependencies effectively.

Deployed on Amazon Web Services (AWS), RasoiGuru offers easy access and utilization for users. AWS also ensures scalability, allowing the application to handle varying user loads seamlessly.

Architecture

architecture

API information

  • API Recording
API.demo.mp4

  • API Information
API-info

/: Check service status

/chat: Initiate a conversation with RasoiGuru chatbot. Accepts a POST request with a JSON payload containing the user's query. Returns a response with the chatbot's answer. Requires a session_id cookie for session management.

Required API Keys

This project requires the following API keys:

  • LangChain API key: Required for LangSmith tracking.
  • Pinecone API key: Required for storing vectors in Vector database.
  • Cohere API key: Required for vector Embedding.
  • Groq API key: Required for accessing the LLM.

LangSmith facilitates usage tracking and provides valuable insights into user behavior through seamless integration. The screenshot below illustrates a sample view of RasoiGuru usage data within the LangSmith platform.

App Screenshot

Ensure that you obtain these API keys before running the project.

Project Setup

Clone this GitHub repository

(base)$: git clone https://github.com/Deepmalya-Rakshit/RasoiGuru.git

Go to the project directory

(base)$: cd RasoiGuru

Configure environment

  • Create the conda environment
(base)$: conda  create -p venv python==3.10 -y
  • Activate the environment
(base)$: conda activate venv
  • Install the required dependencies
(venv)$: pip install -r requirements.txt

Run it

(venv)$: python uvicorn main:app --host 0.0.0.0 --port 8000

It will start the FastAPI application, making it accessible at http://localhost:8000

Deployment on AWS

Step 1

First login to the AWS: https://aws.amazon.com/console/

Step 2

Search about EC2 in the services section.

Step 3

Configure the Ubuntu machine.

Step 4

Launch the instance.

Step 5

Do the port mapping to this port: 8000

Step 6

Run the following commands.

sudo apt update
sudo apt-get update
sudo apt upgrade -y
sudo apt install git curl unzip tar make sudo vim wget -y
git clone https://github.com/Deepmalya-Rakshit/RasoiGuru.git
cd RasoiGuru
sudo apt install python3-pip
sudo apt install python3-venv
python3 -m venv venv
source venv/bin/activate
pip3 install -r requirements.txt

If you want to add the API keys

  • Create .env file in the AWS server using touch .env

  • Next write vi .env

  • Press i

  • Copy API keys and paste it

  • Press : , then wq! and hit enter

Step 7

#Temporary running
python3 -m uvicorn main:app --host 0.0.0.0 --port 8000
#Permanent running
nohup python3 -m uvicorn main:app --host 0.0.0.0 --port 8000

Dependencies

  • fastapi
  • langchain
  • langchain-community
  • langchain_cohere
  • langchain_core
  • langchain_groq
  • langchain_pinecone
  • pinecone-client
  • pypdf
  • python-dotenv
  • wikipedia

Author

Deepmalya Rakshit

© 2024 RasoiGuru by Deepmalya Rakshit

Back to Top

About

RasoiGuru is your ultimate cooking assistant chatbot, offering detailed recipes, ingredient substitutions, and personalized culinary tips. 🍳 Built with FastAPI and deployed on AWS, it ensures seamless integration, robust performance, and scalability. 🚀

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published