Various Jupyter Notebooks used for experimentation.
- Click on any
*.ipynbfile. - Click ing on the
Rawbutton and thenCtrl+Sto save the file. - Import the notebooks into the IllumiDesk course as a new
Activity. - Run the cells in the notebook to see the results.
NOTE: When using the IllumiDesk Activity, you need to set the
openai_api_keyvariable in the first cell of the notebook as a named parameter to theOpenAIclass. For example:
openai_api_key = "sk-..."
chatgpt_chain = LLMChain(
llm=OpenAI(temperature=0, openai_api_key=openai_api_key),
prompt=prompt,
verbose=True,
memory=ConversationBufferWindowMemory(k=2),
)The
OPENAI_API_KEYis already set in theCodespacesenvironment variables.
-
Click on the
Codebutton and thenOpen with Codespaces.Python 3.10 and JupyterLab are enabled by default
-
Click on the
Runbutton to start the JupyterLab server.
- Clone this repository.
- Create a virtuale environment and install the requirements.
virtualenv -p python3 venv/
source venv/bin/activate
pip install -r requirements.txt- Export the OPENAI_API_KEY environment variable.
export OPENAI_API_KEY=sk-...- Start the Jupyter Notebook server.
jupyter lab