https://github.com/alejandrosoares/webchat
A chatbot that answers questions about website content. Built using Python and LangChain.
https://github.com/alejandrosoares/webchat
langchain llm python streamlit
Last synced: about 2 months ago
JSON representation
A chatbot that answers questions about website content. Built using Python and LangChain.
- Host: GitHub
- URL: https://github.com/alejandrosoares/webchat
- Owner: alejandrosoares
- Created: 2025-04-03T13:20:26.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-03T16:21:17.000Z (about 1 year ago)
- Last Synced: 2025-04-09T16:20:44.024Z (about 1 year ago)
- Topics: langchain, llm, python, streamlit
- Language: Python
- Homepage:
- Size: 89.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# WebChat
WebChat is a chat bot that extracts and cleans the content of a website, allowing you to interact with it through a conversational interface.
## Features
- **Ensemble retriever**: combines keyword and semantic search to retrieve the source documents.
- **Maximum Marginal Relevance**: re-ranks source documents maximizing the diversity and reducing redundancy.
- **Reorder**: places the most relevant documents earlier in the context to avoid the lost-in-the-middle problem.
## Installation
1. Set the following environment variables in an .env file in project directory:
```
OPENAI_API_KEY
WEBSITE_NAME
WEBSITE_URL
WEBSITE_DESCRIPTION
```
2. Create a virtual environment and install dependencies:
```
pip install -r requirements.txt
```
3. Ingest the website content:
```
python src/ingest
```
4. Run the streamlit web app:
```
streamlit run src/app.py
```
## Screenshot and demo video

[](https://drive.google.com/file/d/19oFXdhismVUNWLNoVhvjSX23qW1PxtgM/view?usp=sharing)
## References
1. **LangChain Documentation**:
[https://docs.langchain.com/](https://docs.langchain.com/)
2. **Streamlit Documentation**:
[https://docs.streamlit.io/](https://docs.streamlit.io/)
3. **Platzi LangChain Course for Document Management and Retrieval**:
[https://platzi.com/cursos/langchain-documents/](https://platzi.com/cursos/langchain-documents/)