This project is a LangChain-powered AI application built using Python, with a Streamlit frontend and integrated with the OpenAI GPT-4 API.
It allows users to interact with a Large Language Model (LLM) through a simple web interface and receive intelligent, contextual responses.
.
├── my_app.py # Streamlit application entry point
├── requirements.txt # Python dependencies
├── search_app_helper.py # Chains, Prompt template and helper functions
├── README.md # Project documentation
└── .env # Environment variables
git clone https://github.com/kittenbytes00/langchain-openai-streamlit.git
source venv/bin/activate
On Windows: venv\Scripts\activatepip install -r requirements.txt
Create a .env file in the project root and add:
OPENAI_API_KEY=your_openai_api_key
streamlit run my_app.py
The app will be available at:
http://localhost:8501
User enters a prompt in the Streamlit UI
The input is passed to a LangChain chain
LangChain communicates with OpenAI GPT-4
The LLM response is returned and displayed in real-time