Skip to content

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:

  1. Install the following:

  2. From the command line, navigate to your preferred folder for the workshop.

  3. Clone the Contoso Chat Proxy repository from GitHub:

    git clone https://github.com/gloveboxes/contoso-chat-proxy.git
    
  4. Navigate to the contoso-chat-proxy folder.

    cd contoso-chat-proxy
    
  5. Create a Python virtual environment:

    On Windows:

    python -m venv .venv
    

    On macOS and Linux:

    python3 -m venv .venv
    
  6. 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
    
  7. Install the required Python packages:

    pip install -r requirements.txt
    
  8. Open the contoso-chat-proxy folder in Visual Studio Code.

    code .
    

Grounding data for the workshop

There are two data sources for the workshop:

  1. 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 the create-azure-search.ipynb notebook.
  2. 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:

  1. 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.

  2. Configure the Prompt Flow connections:

    • Open the connections folder, then open the proxy-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.

Proceed to the workshop

Proceed to the Workshop section.