Build your own personal chatbot interface with Streamlit!
TLDR:
- A repository to help you get started building your own chatbots using LangChain
- All conversation content is traced via LangSmith for developer evaluation
- Hostable for free through Streamlit Community Cloud
- API keys required
- Pay-per-use ChatGPT style interface
- Quickstart
- Description
- Functional Requirements
- Non-Functional Requirements
- License
- LLM Providers' Privacy Policies
This app is hosted via Streamlit Community Cloud, here
This project uses poetry
for dependency management to be consistent with Streamlit Community Cloud's deployment process.
Install poetry
with:
pip install -U pip && pip install -U poetry
Then, install the project's dependencies in a virtual environment using poetry
.
Run:
poetry install
You will need to set all required secrets, which require their own respective accounts. Make a copy of "template.secrets.toml" and rename it to "secrets.toml" in the root of the project. Fill out each field in the file.
Need API Keys?
API Platform | Link |
---|---|
Claude | https://console.anthropic.com/ |
https://aistudio.google.com/app/apikey | |
Langchain | https://smith.langchain.com/ |
OpenAI | https://platform.openai.com/api-keys |
You can then start the development server with hot reloading by running:
poetry run streamlit run ./freestream/🏡_Home.py
I originally created this project as a chatbot for law and medical professionals, but I quickly realized a more flexible system would benefit everyone.
Related to extending the capabilities of generative AI.
Concept | Definition |
---|---|
Large Language Model | A model that can generate text. |
RAG | Retrieval Augmented Generation |
C-RAG | Corrective-Retrieval Augmented Generation |
Self-RAG | Self-reflective Retrieval Augmented Generation |
ColBERT | Efficient BERT-Based Document Search |
RAPTOR | Recursive Abstractive Processing for Tree-Organized Retrieval |
FreeStream has two chatbots where you can interact with an LLM of your choosing, for example, GPT-4o or Claude Opus. You can very easily add more LLMs to the chatbot dictionary, like Llama 3 via Ollama, or Gemini-Pro through LangChain's ChatGoogleGenerativeAI
. The original chatbot for this project was "RAGbot," which allows you to ask questions about your upload file(s). Curie, is a more for programming and self-learning purposes.
The application MUST...
- Provide a user interface for chatting with large language models.
- Have a retrieval augmented generative chatbot.
- Provide a range of chatbot pages, differentiated by their prompt engineering.
- Let the user "drop-in" their choice of LLM at any time during a conversation.
Allow users to perform image upscaling (PDF, JPEG, PNG) without limits.
The application SHOULD...
- Aim for 24/7 availability.
- Prioritize ease of navigation
- Feature a visually appealing, seamless interface.