This repo contains Jupyter Notebook versions of the Redis Chatbot for Azure OpenaAI Streamlit app, adapted to use "pure" OpenAI.
You can execute the code step by step and to examine intermediate artifacts, such as the text chunks used for generating the embeddings.
- Python 3.11
- An execution environment for Jupyter Notebook. I find that Anaconda works best
- Python requirements installed:
pip install -r requirements.txt
Copy file env.example
to .env
and change values to reflect your environment. Note that by default the notebook is configured for a locally running Redis Stack on port 6379 - change the value of REDIS_URL
in the cell below Apply Config
if you want to connect to a Redis Docker container (REDIS_URL
) or a Redis Enterprise instance on Azure (AZURE_REDIS_URL
).
- A Redis database with a public URL, for example a fixed subscription in Redis Cloud. This database must include the Search module.
Your Colab environment needs to have four secrets set:
openai_api_key
- your OpenAI API keyredis_password
- the password for the default user in your Redis databaseredis_host
- the host component of your Redis database, for exampleredis-13713.c1.eu-west-1-3.ec2.cloud.redislabs.com
redis_port
- the port of your Redis database, for example13713
Click on the image below and enable your notebook for Colab secrets when prompted.