Prerequisites¶
Before attending the Intelligent App Development Workshop, please ensure you have the following prerequisites in place:
- Azure account: A Microsoft Azure account with an active subscription. If you don't have one, sign up for a free trial.
- Azure subscription with access enabled for the Azure AI Foundry - For more details, see the Azure AI Foundry documentation on how to get access.
Development Environment Setup¶
You have the option of using Github Codespaces or your local development environment.
Using Github Codespaces¶
If using Github Codespaces all prerequisites will be pre-installed, however you will need to create a fork as follows:
- Navigate to this link to create a new fork (must be logged into your github account).
- Accept the default values and click on "Create fork" which will take you to the forked repository in the browser.
- From your forked repository click on the "<> Code" button. Then click on the "Create codespace on main" button.
Using Local Dev Container¶
If you want to use a local dev container, you're in luck! This repo has a container definition.
- Install VS Code with the C# and Dev Container extensions.
- Install Docker Desktop locally
- Open the repo in VS Code and choose the option to re-open the repo in the dev container. If it's the first time, it may take a while to download the image but you can choose the option to monitor the container log.
Using local development environment¶
If you prefer using a computer with using a local development environment, the following pre-requisites need to be installed:
- Git: Ensure you have Git installed on your computer.
- Azure CLI: Install the Azure Command-Line Interface (CLI) to interact with Azure services and manage resources from the command line.
- .NET SDK: install .NET SDK to build and run .NET projects.
- Docker: Install Docker Desktop to build and run containerized applications.
- Node.Js: Install Node.Js to build and run web application.
- Azure Development CLI: Install azd to be able to provision and deploy application to Azure.
- bash/shell terminal: the lessons assume bash/shell script syntax. If using Windows, either you can either using Git Bash (included when you install Git) or installing WSL (Windows Subsystem for Linux).
Next you will need to clone this repo using:
Change directory into cloned repo:
Set up Azure Resources¶
-
Deploy Pre-requisite resource template
- In your cli, go to the
/workshop/pre-reqs/
directory and runaz login
- Run
azd provision -e sk-test-pre-req
. Later, if you choose to deploy the app to ACA, you will deploy to a different resource group (sk-test
). - Choose the appropriate subscription and location.
eastus2
orswedencentral
are recommended. - When complete, you should be able to log to the portal and see the resources:
- Go to the Azure Portal.
- In the search bar, type in
Resource Groups
, and choose the Resource Groups page. - Locate the newly created RG and view the resources in it.
- In your cli, go to the
-
Create Azure Grounding with Bing Search resource. We will use this to ensure the LLM can get current data from the internet:
- Go to the Azure Portal.
- Click on Create A Resource
- On the search bar type Grounding with Bing Search and hit enter
- Locate Grounding with Bing Search and click Create
- On the Create a Grounding with Bing Search Resource page, provide the following information for the fields on the Basics tab:
- Subscription: The Azure subscription to used for your service.
- Resource group: Select the resource group created by the prerequisites stack
- Name: A descriptive and unique name for your Grounding with Bing Search Service resource, such as
grounding-bing-search-myid
. - Region: Global (default).
- Pricing Tier: Grounding with Bing Search (default)
- Terms: Check the box to acknowledge the terms of use.
- Click Next.
- On the Tags tab click Next
- Click Create.
-
Create Agents connection to Grounding with Bing Search resource:
- Go to the Azure AI Foundry (https://ai.azure.com/) and choose the project created by bicep.
- Scroll down on the left side and click Management Center.
- On the left side click Connected Resources.
- You will see that the bicep template deployed an OpenAI resource and connected it to your Foundry project.
- Click New Connection
- Scroll down and choose Grounding with Bing Search.
- Click Create connection.
- Find the resource you created and click Add connection.
- Click Close.
- On the Connections page, copy the name of the connection you just created and paste it as the groundingWithBingConnectionId value within the
AIFoundryProject
element in theappSettings.json
file.
-
Upgrade OpenAI Connection
- The OpenAI connection needs to be upgraded to allow you to see your deployed model. On the Connections page, click on your Open AI connection.
- Click Upgrade Connection
- On the left, click Models + Endpoints and you should see your
gpt-4o
deployment. If you need to adjust settings on it at a later time, this is where you can find it.
appsettings.json Configuration¶
-
Go to the
workshop/dotnet/Lessons
directory. Copy and rename the fileappsettings.json.example
into each of the lesson directories as follows (example command for Lesson1): -
Store AI Foundry settings in
appsettings.json
- In Azure AI Foundry main project page, copy the connection string and use it as the connectionString value in the
AIFoundryProject
element ofappsettings.json
. - Under My Assets choose Models + Endpoints. Next to the
gpt-4o
deployment, clickGet Endpoint
. - Copy the endpoint and store it as endpoint value in the
AIFoundryProject
element ofappsettings.json
. - Copy the api key and store as the apiKey value in
appsettings.json
.
- In Azure AI Foundry main project page, copy the connection string and use it as the connectionString value in the
-
We need to obtain an API Key to be able to get stock prices from polygon.io. You can sign up for a free API Key by creating a login. This value will be needed for Lesson 3.
- Once logged in, from the polygon.io Dashboard locate the Keys section. Copy the default key value and paste it as the apiKey value within the
StockService
element in theappsettings.json
file.
- Once logged in, from the polygon.io Dashboard locate the Keys section. Copy the default key value and paste it as the apiKey value within the
By ensuring you have completed these prerequisites, you'll be well-prepared to dive into the Intelligent App Development Workshop and make the most of the hands-on learning experience.