/redbox-copilot-streamlit

A streamlit frontend for Redbox Copilot

Primary LanguageHTMLMIT LicenseMIT

📮 Redbox [Streamlit app]

Important

Incubation Project: This project is an incubation project; as such, we DON’T recommend using it in any critical use case. This project is in active development and a work in progress. This project may one day Graduate, in which case this disclaimer will be removed.

Redbox is a retrieval augmented generation (RAG) app that uses GenAI to chat with and summarise civil service documents. It's designed to handle a variety of administrative sources, such as letters, briefings, minutes, and speech transcripts.

  • Better retrieval. Redbox increases organisational memory by indexing documents
  • Faster, accurate summarisation. Redbox can summarise reports read months ago, supplement them with current work, and produce a first draft that lets civil servants focus on what they do best

This repo contains a Streamlit frontend for the core Redbox project.

Contributing

Development is done through dev containers to control for varying dependency requirements across operating systems for libraries like torch.

We use poetry to manage requirements, and these assume Linux.

We welcome contributions to this project. Please see the CONTRIBUTING.md file for more information.

First time setup

Clone the repo to your local machine.

Dev container

Before you build the container, get the absolute path to your repo:

pwd

Copy this path.

Build the container. When prompted, give the path you copied. See the docker-outside-of-docker documentation for information and troubleshooting.

On some OSes, the container may not automatically share your GitHub SSH key with the host system. See this answer on Stack Overflow to solve this.

Environment variables

Set up environment variables. Use .env.example to get started.

cp .env.example .env

Setting one of ANTHROPIC_API_KEY or OPENAI_API_KEY is essential.

If you have issues with permissions, you may need to run chmod 777 data/elastic/ to be able to write to the folder.

Usage

We use GNU make to help run the project. To see all commands:

make

To start the app:

make up

To stop the app:

make down

The project can take up a lot of space in docker image and build caches. It may be necessary to clear these from time to time.

The following commands are potentially destrictive and so we don't give them easy make commands -- run them at your own risk.

Clear your docker image cache:

docker image prune

Clear your docker build cache:

docker builder prune

License

This project is licensed under the MIT License - see the LICENSE file for details.

Security

If you discover a security vulnerability within this project, please follow our Security Policy.