ConvoWeb is a Conversational RAG (Retrieval-Augmented Generation) application built with Streamlit, LangChain, Google Gemini, and Chroma Vector Store. It allows users to ask questions based on the contents of a given website by loading and indexing its content, then using a history-aware conversational interface to provide accurate, context-rich responses.
- ✅ Load and parse webpage content using
WebBaseLoader - ✅ Split content into manageable chunks with
RecursiveCharacterTextSplitter - ✅ Embed content using
GoogleGenerativeAIEmbeddings - ✅ Store and retrieve chunks with
Chromavector store - ✅ Use LangChain's
create_history_aware_retrieverfor contextual search - ✅ Gemini-powered response generation via
ChatGoogleGenerativeAI - ✅ Chat memory via
st.session_statefor multi-turn conversations - ✅ Simple and intuitive Streamlit UI
---
- Python 3.9+
- Packages listed in
requirements.txt(see below) - Google Gemini API Key in a
.envfile
# Clone the repository
git clone https://github.com/Nikhil-Dadhich/ConvoWeb.git
cd ConvoWeb
# Create and activate a virtual environment
python -m venv venv
source venv/bin/activate # or venv\Scripts\activate on Windows
# Install dependencies
pip install -r requirements.txt
# Add your Google API key to .env
echo "GEMINI_API_KEY=your_google_gemini_key" > .env
# Run the Streamlit app
streamlit run app.pyCreate a .env file in the root directory:
GEMINI_API_KEY=your_google_gemini_api_key- Enter a valid website URL in the sidebar.
- Wait while the content is parsed and vectorized.
- Ask questions in the chat interface based on the content.
- Enjoy rich, contextual answers from the chatbot!
get_vectorstore(): Loads and splits the website content and stores in Chroma.get_context_retriever_chain(): Creates a retriever chain using chat history.get_conversational_rag_chain(): Combines retriever and LLM for RAG.- Streamlit App: Handles user input and manages chat state.
Nikhil Dadhich
Built with ❤️ using Streamlit and LangChain.
