Skip to content

Latest commit

 

History

History
137 lines (74 loc) · 6.88 KB

File metadata and controls

137 lines (74 loc) · 6.88 KB

AI Studio Deployment Guide

Please follow the steps below to configure the Prompt flow endpoint in App service configuration.

Step 1: Open AI Studio Project

  1. Launch the AI Studio and select Build from the top menu.

    Home

  2. Click on the project with name ai_project_{your deployment prefix}.

Step 2: Import Prompt Flow and Deploy

  1. Click on PromptFlow button from left menu under Tools.

    Prompt Flow

  2. Click on Create button. Then click on Upload button from Upload From Local option from the last row.

    Upload

  3. Click on Zip File radio button. Then click on Browse to select the file DraftFlow.zip from the cloned/downloaded GitHub repository folder. The file will be located at <Your Download Folder Path>/ResearchAssistant/Deployment/scripts/ai_hub_scripts/flows/.

    Select Local File

  4. Once the DraftFlow.zip file is uploaded, change folder name to DraftFlow and Select Flow type as Chat Flow and click on Upload button.

    Upload Local File

  5. Click on Select runtime and chick on Start from the drop-down list. It can take few minutes for the runtime to start.

    Select Runtime

  6. Click on Deploy button once it is enabled. Enter a unique name for Endpoint Name field.

    IMPORTANT: This name has to be unique across all endpoints in your Azure subscription.

    You can leave the Deployment name, Virtual machine type, and Instace count as populated and click on Review + Create. Optionally you can choose a different VM type/size and increase/decrease the Instance count as needed. Then review details and click on Create in the next screen.

    Deploy Draft Flow

  7. It will take few minutes for the flow to be validated and deployed. Click on Deployments from left menu. You might only see the Default_AzureOpenAI deployments in the page until the deployment is completed. Please wait and click on Refresh after few minutes.

    Deployments Page

  8. Click on the deployed endpoint with name draftsinference-1. Drafts Endpoint

  9. Click on Consume from the top menu. Copy below details to use later in step 3.6.

  • Deployment

  • REST endpoint

  • Primary key

    Drafts Endpoint Consume

Step 3: Update the deployment keys in Azure App Service configuration

  1. Launch the Azure Portal Azure Portal.

  2. Enter Resource Groups in the top search bar.

    Search Resource Groups

  3. Locate your Resource Group you selected/created during one-click deployment and click on it.

  4. Locate the App Service in the Resource Group and click on it.

  5. Click on Environment Variables from left menu under Settings.

    Application Environment Variables

  6. Modify the below variables with values collected in step 2.9 above.

  • AI_STUDIO_DRAFT_FLOW_ENDPOINT
  • AI_STUDIO_DRAFT_FLOW_API_KEY
  • AI_STUDIO_DRAFT_FLOW_DEPLOYMENT_NAME
  1. Click on Apply button at the bottom of the screen. Then click on Confirm in the pop-up.

    Application Environment Variables Confirm

  2. Click on Overview from the left menu. Then click on Restart button in the top menu. Then click on Yes in the pop-up message.

    Application Restart

Step 4: Add Authentication in Azure App Service configuration

  1. Click on Authentication from left menu.

Authentication

  1. Click on + Add Provider to see a list of identity providers.

Authentication Identity

  1. Click on + Add Provider to see a list of identity providers.

Add Provider

  1. Select the first option Microsoft Entra Id from the drop-down list. If Create new app registration is disabled, go to Step 4a

Add Provider

  1. Accept the default values and click on Add button to go back to the previous page with the identify provider added.

Add Provider

Step 4a: Creating a new App Registration

  1. Click on Home and select Microsoft Entra ID.

Microsoft Entra ID

  1. Click on App registrations.

App registrations

  1. Click on + New registration.

New Registrations

  1. Provide the Name, select supported account types as Accounts in this organizational directory only(Contoso only - Single tenant), select platform as Web, enter/select the URL and register.

Add Details

  1. After application is created sucessfully, then click on Add a Redirect URL.

Redirect URL

  1. Click on + Add a platform.

+ Add platform

  1. Click on Web.

Web

  1. Enter the web app URL (Provide the app service name in place of XXXX) and Save. Then go back to Step 4 and follow from Point 4 choose Pick an existing app registration in this directory from the Add an Identity Provider page and provide the newly registered App Name.

Add Details