Install the workshop prerequisites on your local computer
Tested and supported on Windows 11 x64 and macOS Apple Silicon. Fails on Windows and Linux on Arm, use GitHub Codespaces instead.
To run the workshop on your own computer you need admin rights on Windows. Complete the following steps:
-
Install the following:
- On Windows install Python, skip for macOS and Linux as Python is pre-installed.
- Visual Studio Code
- Python VS Code Extension
- Prompt Flow VS Code Extension
-
From the command line, navigate to your preferred folder for the workshop.
-
Clone the Contoso Chat Proxy repository from GitHub:
git clone https://github.com/gloveboxes/contoso-chat-proxy.git
-
Navigate to the
contoso-chat-proxy
folder.cd contoso-chat-proxy
-
Create a Python virtual environment:
On Windows:
python -m venv .venv
On macOS and Linux:
python3 -m venv .venv
-
Activate the virtual environment:
On Windows:
# In cmd.exe .venv\Scripts\activate.bat # In PowerShell .venv\Scripts\Activate.ps1
On macOS and Linux:
source .venv/bin/activate
-
Install the required Python packages:
pip install -r requirements.txt
-
Open the
contoso-chat-proxy
folder in Visual Studio Code.code .
Grounding data for the workshop
There are two data sources for the workshop:
- Product information from Azure AI Search. This data is accessed via the Azure AI Proxy Endpoint. The data was loaded into Azure AI Search from the
data/product_info
folder using thecreate-azure-search.ipynb
notebook. - Customer order history data is loaded from the
data/customer_info
folder into a Python Pandas DataFrame. The data is used to create a personalized shopping experience for the customer. In production, this data would be accessed from a database such as Cosmos DB.
Create the Prompt Flow connections
The following connections are created:
- aoai-connection: This connection is used to access Azure OpenAI embedding, gpt-35-turbo and gpt-4 large language models (LLMs).
- contoso-search: This connection is used to access the Azure AI Search service and
contoso-products
search index.
Create the Prompt Flow connections:
-
From VS Code, update the
.env.proxy
file with the Azure AI Proxy Endpoint and API Key provided to you. Update the AI_PROXY_ENDPOINT and AI_PROXY_KEY with the values from the Azure AI Proxy Endpoint. Ignore the rest of the environment variables. -
Configure the Prompt Flow connections:
- Open the
connections
folder, then open theproxy-create-connections.ipynb
notebook. - You will be prompted to install the Jupyter extension, select Install.
- Select
Run All
in the notebook to create the connections.
- Open the
Proceed to the workshop
Proceed to the Workshop section.