Skip to content

Commit c7c61b9

Browse files
committed
Address Pamela feedback
1 parent f33cc40 commit c7c61b9

4 files changed

Lines changed: 36 additions & 61 deletions

File tree

.github/workflows/azure-dev.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ jobs:
2828
AZURE_ENV_NAME: ${{ vars.AZURE_ENV_NAME }}
2929
AZURE_LOCATION: ${{ vars.AZURE_LOCATION }}
3030
# Project specific
31-
AZURE_GPT_MODEL_NAME: ${{ vars.AZURE_GPT_MODEL_NAME }}
32-
AZURE_GPT_MODEL_VERSION: ${{ vars.AZURE_GPT_MODEL_VERSION }}
33-
AZURE_GPT_DEPLOYMENT_NAME: ${{ vars.AZURE_GPT_DEPLOYMENT_NAME }}
34-
AZURE_GPT_DEPLOYMENT_CAPACITY: ${{ vars.AZURE_GPT_DEPLOYMENT_CAPACITY }}
31+
AZURE_OPENAI_CHAT_MODEL: ${{ vars.AZURE_OPENAI_CHAT_MODEL }}
32+
AZURE_OPENAI_CHAT_MODEL_VERSION: ${{ vars.AZURE_OPENAI_CHAT_MODEL_VERSION }}
33+
AZURE_OPENAI_CHAT_DEPLOYMENT: ${{ vars.AZURE_OPENAI_CHAT_DEPLOYMENT }}
34+
AZURE_OPENAI_CHAT_DEPLOYMENT_CAPACITY: ${{ vars.AZURE_OPENAI_CHAT_DEPLOYMENT_CAPACITY }}
3535
steps:
3636
- name: Checkout
3737
uses: actions/checkout@v6

README.md

Lines changed: 8 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
<!--
22
---
33
name: Python Agent Framework Demos
4-
description: Collection of Python examples for Microsoft Agent Framework using GitHub Models or Azure OpenAI.
4+
description: Collection of Python examples for Microsoft Agent Framework using GitHub Models or Azure AI Foundry.
55
languages:
66
- python
77
products:
88
- azure-openai
99
- azure
10+
- ai-services
1011
page_type: sample
1112
urlFragment: python-agentframework-demos
1213
---
@@ -16,17 +17,16 @@ urlFragment: python-agentframework-demos
1617
[![Open in GitHub Codespaces](https://img.shields.io/static/v1?style=for-the-badge&label=GitHub+Codespaces&message=Open&color=brightgreen&logo=github)](https://codespaces.new/Azure-Samples/python-agentframework-demos)
1718
[![Open in Dev Containers](https://img.shields.io/static/v1?style=for-the-badge&label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/Azure-Samples/python-agentframework-demos)
1819

19-
This repository provides examples of [Microsoft Agent Framework](https://learn.microsoft.com/agent-framework/) using LLMs from [GitHub Models](https://github.com/marketplace/models). Those models are free to use for anyone with a GitHub account, up to a [daily rate limit](https://docs.github.com/github-models/prototyping-with-ai-models#rate-limits).
20+
This repository provides examples of [Microsoft Agent Framework](https://learn.microsoft.com/agent-framework/) using LLMs from [GitHub Models](https://github.com/marketplace/models), [Azure AI Foundry](https://learn.microsoft.com/azure/ai-foundry/), or other model providers. GitHub Models are free to use for anyone with a GitHub account, up to a [daily rate limit](https://docs.github.com/github-models/prototyping-with-ai-models#rate-limits).
2021

2122
* [Getting started](#getting-started)
2223
* [GitHub Codespaces](#github-codespaces)
2324
* [VS Code Dev Containers](#vs-code-dev-containers)
2425
* [Local environment](#local-environment)
2526
* [Configuring model providers](#configuring-model-providers)
2627
* [Using GitHub Models](#using-github-models)
27-
* [Using Azure OpenAI models](#using-azure-openai-models)
28+
* [Using Azure AI Foundry models](#using-azure-ai-foundry-models)
2829
* [Using OpenAI.com models](#using-openaicom-models)
29-
* [Using Ollama models](#using-ollama-models)
3030
* [Running the Python examples](#running-the-python-examples)
3131
* [Resources](#resources)
3232

@@ -87,7 +87,7 @@ A related option is VS Code Dev Containers, which will open the project in your
8787

8888
## Configuring model providers
8989

90-
These examples can be run with Azure OpenAI account, OpenAI.com, local Ollama server, or GitHub models, depending on the environment variables you set. All the scripts reference the environment variables from a `.env` file, and an example `.env.sample` file is provided. Host-specific instructions are below.
90+
These examples can be run with Azure AI Foundry, OpenAI.com, or GitHub Models, depending on the environment variables you set. All the scripts reference the environment variables from a `.env` file, and an example `.env.sample` file is provided. Host-specific instructions are below.
9191

9292
## Using GitHub Models
9393

@@ -111,11 +111,11 @@ If you want to run the scripts locally, you need to set up the `GITHUB_TOKEN` en
111111
112112
10. Optionally, you can use a model other than "gpt-4o" by setting the `GITHUB_MODEL` environment variable. Use a model that supports function calling, such as: `gpt-5`, `gpt-5-mini`, `gpt-4o`, `gpt-4o-mini`, `o3-mini`, `AI21-Jamba-1.5-Large`, `AI21-Jamba-1.5-Mini`, `Codestral-2501`, `Cohere-command-r`, `Ministral-3B`, `Mistral-Large-2411`, `Mistral-Nemo`, `Mistral-small`
113113
114-
## Using Azure OpenAI models
114+
## Using Azure AI Foundry models
115115
116-
You can run all examples in this repository using GitHub Models. If you want to run the examples using models from Azure OpenAI instead, you need to provision the Azure AI resources, which will incur costs.
116+
You can run all examples in this repository using GitHub Models. If you want to run the examples using models from Azure AI Foundry instead, you need to provision the Azure AI resources, which will incur costs.
117117
118-
This project includes infrastructure as code (IaC) to provision Azure OpenAI deployments of "gpt-4o" and "text-embedding-3-large". The IaC is defined in the `infra` directory and uses the Azure Developer CLI to provision the resources.
118+
This project includes infrastructure as code (IaC) to provision Azure OpenAI deployments of "gpt-5-mini" and "text-embedding-3-large" via Azure AI Foundry. The IaC is defined in the `infra` directory and uses the Azure Developer CLI to provision the resources.
119119
120120
1. Make sure the [Azure Developer CLI (azd)](https://aka.ms/install-azd) is installed.
121121
@@ -162,31 +162,6 @@ This project includes infrastructure as code (IaC) to provision Azure OpenAI dep
162162
OPENAI_MODEL=gpt-4o-mini
163163
```
164164
165-
## Using Ollama models
166-
167-
1. Install [Ollama](https://ollama.com/) and follow the instructions to set it up on your local machine.
168-
2. Pull a model, for example:
169-
170-
```shell
171-
ollama pull qwen3:30b
172-
```
173-
174-
Note that most models do not support tool calling to the extent required by agents frameworks, so choose a model accordingly.
175-
176-
3. Create a `.env` file by copying the `.env.sample` file and updating it with your Ollama endpoint and model name.
177-
178-
```bash
179-
cp .env.sample .env
180-
```
181-
182-
4. Update the `.env` file with your Ollama endpoint and model name (any model you've pulled):
183-
184-
```bash
185-
API_HOST=ollama
186-
OLLAMA_ENDPOINT=http://localhost:11434/v1
187-
OLLAMA_MODEL=llama3.1
188-
```
189-
190165
## Running the Python examples
191166
192167
You can run the examples in this repository by executing the scripts in the `examples` directory. Each script demonstrates a different Agent Framework pattern.

infra/main.bicep

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -41,37 +41,37 @@ param environmentName string
4141
param location string
4242

4343
@description('Name of the GPT model to deploy')
44-
param gptModelName string = 'gpt-5-mini'
44+
param azureOpenaiChatModel string = 'gpt-5-mini'
4545

4646
@description('Version of the GPT model to deploy')
4747
// See version availability in this table:
4848
// https://learn.microsoft.com/azure/ai-foundry/foundry-models/concepts/models-sold-directly-by-azure?pivots=azure-openai#models-by-deployment-type
49-
param gptModelVersion string = '2025-08-07'
49+
param azureOpenaiChatModelVersion string = '2025-08-07'
5050

5151
@description('Name of the model deployment (can be different from the model name)')
52-
param gptDeploymentName string = 'gpt-5-mini'
52+
param azureOpenaiChatDeployment string = 'gpt-5-mini'
5353

5454
@description('Capacity of the GPT deployment')
5555
// You can increase this, but capacity is limited per model/region, so you will get errors if you go over
5656
// https://learn.microsoft.com/en-us/azure/ai-services/openai/quotas-limits
57-
param gptDeploymentCapacity int = 30
57+
param azureOpenaiChatDeploymentCapacity int = 30
5858

5959

6060
@description('Name of the text embedding model to deploy')
61-
param embeddingModelName string = 'text-embedding-3-large'
61+
param azureOpenaiEmbeddingModel string = 'text-embedding-3-large'
6262

6363
@description('Version of the text embedding model to deploy')
6464
// See version availability in this table:
6565
// https://learn.microsoft.com/azure/ai-services/openai/concepts/models?tabs=python-secure%2Cglobal-standard%2Cstandard-chat-completions#models-by-deployment-type
66-
param embeddingModelVersion string = '1'
66+
param azureOpenaiEmbeddingModelVersion string = '1'
6767

6868
@description('Name of the model deployment (can be different from the model name)')
69-
param embeddingDeploymentName string = 'text-embedding-3-large'
69+
param azureOpenaiEmbeddingDeployment string = 'text-embedding-3-large'
7070

7171
@description('Capacity of the text embedding deployment')
7272
// You can increase this, but capacity is limited per model/region, so you will get errors if you go over
7373
// https://learn.microsoft.com/en-us/azure/ai-services/openai/quotas-limits
74-
param embeddingDeploymentCapacity int = 30
74+
param azureOpenaiEmbeddingDeploymentCapacity int = 30
7575

7676
@description('Id of the user or app to assign application roles')
7777
param principalId string = ''
@@ -110,27 +110,27 @@ module openAi 'br/public:avm/res/cognitive-services/account:0.7.1' = {
110110
}
111111
deployments: [
112112
{
113-
name: gptDeploymentName
113+
name: azureOpenaiChatDeployment
114114
model: {
115115
format: 'OpenAI'
116-
name: gptModelName
117-
version: gptModelVersion
116+
name: azureOpenaiChatModel
117+
version: azureOpenaiChatModelVersion
118118
}
119119
sku: {
120120
name: 'GlobalStandard'
121-
capacity: gptDeploymentCapacity
121+
capacity: azureOpenaiChatDeploymentCapacity
122122
}
123123
}
124124
{
125-
name: embeddingDeploymentName
125+
name: azureOpenaiEmbeddingDeployment
126126
model: {
127127
format: 'OpenAI'
128-
name: embeddingModelName
129-
version: embeddingModelVersion
128+
name: azureOpenaiEmbeddingModel
129+
version: azureOpenaiEmbeddingModelVersion
130130
}
131131
sku: {
132132
name: 'GlobalStandard'
133-
capacity: embeddingDeploymentCapacity
133+
capacity: azureOpenaiEmbeddingDeploymentCapacity
134134
}
135135
}
136136
]
@@ -150,7 +150,7 @@ output AZURE_RESOURCE_GROUP string = resourceGroup.name
150150

151151
// Specific to Azure OpenAI
152152
output AZURE_OPENAI_ENDPOINT string = openAi.outputs.endpoint
153-
output AZURE_OPENAI_CHAT_MODEL string = gptModelName
154-
output AZURE_OPENAI_CHAT_DEPLOYMENT string = gptDeploymentName
155-
output AZURE_OPENAI_EMBEDDING_MODEL string = embeddingModelName
156-
output AZURE_OPENAI_EMBEDDING_DEPLOYMENT string = embeddingDeploymentName
153+
output AZURE_OPENAI_CHAT_MODEL string = azureOpenaiChatModel
154+
output AZURE_OPENAI_CHAT_DEPLOYMENT string = azureOpenaiChatDeployment
155+
output AZURE_OPENAI_EMBEDDING_MODEL string = azureOpenaiEmbeddingModel
156+
output AZURE_OPENAI_EMBEDDING_DEPLOYMENT string = azureOpenaiEmbeddingDeployment

infra/main.parameters.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@
1414
"runningOnGitHub": {
1515
"value": "${GITHUB_ACTIONS}"
1616
},
17-
"gptModelName": {
17+
"azureOpenaiChatModel": {
1818
"value": "${AZURE_OPENAI_CHAT_MODEL}"
1919
},
20-
"gptModelVersion": {
20+
"azureOpenaiChatModelVersion": {
2121
"value": "${AZURE_OPENAI_CHAT_MODEL_VERSION}"
2222
},
23-
"gptDeploymentName": {
23+
"azureOpenaiChatDeployment": {
2424
"value": "${AZURE_OPENAI_CHAT_DEPLOYMENT}"
2525
},
26-
"gptDeploymentCapacity": {
26+
"azureOpenaiChatDeploymentCapacity": {
2727
"value": "${AZURE_OPENAI_CHAT_DEPLOYMENT_CAPACITY}"
2828
}
2929
}

0 commit comments

Comments
 (0)