Skip to content

Commit 164d85f

Browse files
author
Maryanne Gichohi
committed
Address PR comments
1 parent b1204f1 commit 164d85f

3 files changed

Lines changed: 22 additions & 23 deletions

File tree

examples/Python/ai-agent-sample-app/README.md renamed to examples/Python/WeatherAgent/README.md

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -25,32 +25,31 @@ This sample demonstrates using Azure App Configuration to load agent YAML specif
2525
pip install -r requirements.txt
2626
```
2727

28-
1. Configure your Azure App Configuration store with the agent YAML specification:
28+
1. Configure your Azure App Configuration store with the following key-value pairs:
2929

30+
| Key | Value |
31+
|-----|-------|
32+
| _WeatherAgent:Spec_ | See YAML below |
33+
| _WeatherAgent:ProjectEndpoint_ | Your Foundry project endpoint |
34+
35+
**YAML specification for _WeatherAgent:Spec_:**
3036
```yaml
31-
kind: Prompt
32-
name: WeatherAgent
33-
description: Weather Agent
34-
instructions: You are a helpful assistant.
35-
model:
36-
id: gpt-4.1
37-
connection:
38-
kind: remote
37+
kind: Prompt
38+
name: WeatherAgent
39+
description: Weather Agent
40+
instructions: You are a helpful assistant.
41+
model:
42+
id: gpt-4.1
43+
connection:
44+
kind: remote
3945
```
40-
41-
1. Configure your Azure App Configuration store with project endpoint:
42-
43-
```console
44-
Agent:ProjectEndpoint - Your Foundry project endpoint
45-
```
46-
4746
1. Set the required environment variables:
4847
4948
```bash
5049
export AZURE_APPCONFIGURATION_ENDPOINT="https://your-appconfig.azconfig.io"
5150
```
5251

53-
## Running the Application
52+
## Run the Application
5453

5554
Start the console application:
5655

examples/Python/ai-agent-sample-app/app.py renamed to examples/Python/WeatherAgent/app.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
import asyncio
22
import os
33
from agent_framework.declarative import AgentFactory
4-
from azure.identity.aio import AzureCliCredential
4+
from azure.identity.aio import DefaultAzureCredential as AsyncDefaultCredential
55
from azure.identity import DefaultAzureCredential
66
from azure.appconfiguration.provider import load
77

88
async def main():
9-
endpoint = os.environ["APP_CONFIGURATION_ENDPOINT"]
9+
endpoint = os.environ["AZURE_APPCONFIGURATION_ENDPOINT"]
1010
credential = DefaultAzureCredential()
1111

1212
config = load(endpoint=endpoint, credential=credential)
1313

14-
yaml_str = config["Agent:Spec"]
14+
yaml_str = config["WeatherAgent:Spec"]
1515

1616
async with (
17-
AzureCliCredential() as credential,
18-
AgentFactory(client_kwargs={"async_credential": credential, "project_endpoint": config["Agent:ProjectEndpoint"]}).create_agent_from_yaml(yaml_str) as agent,
17+
AsyncDefaultCredential() as credential,
18+
AgentFactory(client_kwargs={"async_credential": credential, "project_endpoint": config["WeatherAgent:ProjectEndpoint"]}).create_agent_from_yaml(yaml_str) as agent,
1919
):
2020
while True:
2121
print("How can I help? (type 'quit' to exit)")
@@ -32,4 +32,4 @@ async def main():
3232
print("Exiting... Goodbye...")
3333

3434
if __name__ == "__main__":
35-
asyncio.run(main())
35+
asyncio.run(main())
File renamed without changes.

0 commit comments

Comments
 (0)