An exploration of LangChain and RAG (Retrieval-Augmented Generation) for building intelligent applications
An exploration of LangChain and RAG (Retrieval-Augmented Generation) for building intelligent applications. This repository includes a Streamlit app that generates restaurant names and menu items based on given recipes using LangChain with Together AI.
- Python 3.12
- Docker (for containerized deployment)
- Together AI API Key
-
Clone the repository:
git clone https://github.com/yourusername/LangchainAndRAG.git cd LangchainAndRAG
-
Create a virtual environment and activate it:
python3.12 -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Install the required packages:
pip install --upgrade pip pip install -r requirements.txt
-
Create a .env file in the project root and add your Together AI API key:
echo "API_KEY=your_actual_api_key_here" > .env
-
Run the Streamlit app:
streamlit run 01_langchainstreamlit.py
-
Docker Setup
- Build the Docker image:
docker build -t streamlit-langchain-app .
- Run the Docker container:
docker run -p 8501:8501 -e API_KEY=your_actual_api_key_here
- streamlit-langchain-app.py.
Streamlit App Open your web browser and go to http://localhost:8501.
-
Enter a recipe in the text input field (e.g., "dal").
-
Click the "Generate" button to see the generated restaurant names and suggested menu items.