Deployment¶
Deploying the Contoso Sales Assistant is a simple process using azd.
Open the project in Visual Studio Code¶
- Open the project in a VS Code dev container as outlined in Development.
- Open a terminal in VS Code by selecting
Terminal
>New Terminal
from the top menu. -
Create a Chainlit Auth Secret. This secret is used to authenticate with the Chainlit API. Run the following command:
chainlit create-secret
Copy the secret to the clipboard as you'll need it in the next step.
-
Authenticate with your Azure account with
az login --use-device-code
. -
Run the following command to deploy the Contoso Sales Assistant to Azure:
azd up
You'll be prompted for the following information:
- Name the environment (e.g.
contoso sales assistant
). - Select your subscription.
- Select the desired location. As at November 2024, the list of locations is limited to those location that support gpt-4o version 2024-08-06.
- Enter the chainlitAuthSecret you created above.
- Enter the literalApiKey. For information on how to create a Literal AI API key the Developer notes.
The deployment will take approximately 5 minutes to complete.
- Name the environment (e.g.
Access the Contoso Sales Assistant¶
Once the deployment is complete, you'll need the app url and password to access the Contoso Sales Assistant.
- From VS Code, navigate to the
.azure
folder in the project. - Expand the
contoso-sales-assistant
resource group and open the.env
file. - Copy the
SERVICE_ACA_URI
andassistantPassword
values to access the Contoso Sales Assistant. - Open a browser and navigate to the
SERVICE_ACA_URI
and append /sales to the URL. - You'll be prompted for email address and password. Enter the email address
sales@contoso.com
and theassistantPassword
value you copied above. - You'll be redirected to the Contoso Sales Assistant. Now you can interact with the assistant to get sales information. Follow the Conversation guide for sample questions you can ask.