Skip to content

Daethyra/FreeStream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FreeStream

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

Table of Contents

Quickstart

This app is hosted via Streamlit Community Cloud, here

Installation

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/
Google 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

Description

I originally created this project as a chatbot for law and medical professionals, but I quickly realized a more flexible system would benefit everyone.

Key Concepts

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

What can I do with FreeStream?

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.

Functional Requirements

The application MUST...

  1. Provide a user interface for chatting with large language models.
  2. Have a retrieval augmented generative chatbot.
  3. Provide a range of chatbot pages, differentiated by their prompt engineering.
  4. Let the user "drop-in" their choice of LLM at any time during a conversation.
  5. Allow users to perform image upscaling (PDF, JPEG, PNG) without limits.

Non-Functional Requirements

The application SHOULD...

  1. Aim for 24/7 availability.
  2. Prioritize ease of navigation
  3. Feature a visually appealing, seamless interface.

LLM Providers' Privacy Policies