Skip to content

Commit 10f7e4d

Browse files
TrademoTrademo
authored andcommitted
changes made as per instructions
1 parent 9a7872a commit 10f7e4d

File tree

3 files changed

+7
-17
lines changed

3 files changed

+7
-17
lines changed

samples/microsoft/python/getting-started-agents/3p-tools/Trademo_Global_trade/ReadME.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# Trademo Shipments and Tariff Tool
1+
# Trademo Shipments And Tariff
22

33
This Python script demonstrates how to use Azure AI to create an agent that queries global trade duties using an OpenAPI specification.
44

55
## About Tool:
6-
- Name: Trademo_Shipments_And_Tariff
7-
- Description: Provides latest duties and past shipment and duty data for trade between multiple countries
6+
- Name: Trademo Shipments And Tariff
7+
- Description: Provides latest duties and past shipment data for trade between multiple countries
88

99

1010
## Features
@@ -22,6 +22,7 @@ This Python script demonstrates how to use Azure AI to create an agent that quer
2222
- azure-ai-projects
2323
- azure-identity
2424
- jsonref
25+
- azure-ai-agents
2526

2627
## Installation
2728
Install dependencies:
@@ -47,7 +48,6 @@ Save that connection name as the PROJECT_OPENAPI_CONNECTION_NAME environment var
4748

4849
Set this environment variables with your own values:
4950
PROJECT_ENDPOINT - the Azure AI Project endpoint, as found in your Foundry Project.
50-
PROJECT_OPENAPI_CONNECTION_NAME - the connection name for the OpenAPI connection authentication
5151
MODEL - name of the model deployment in the project to use Agents against
5252
CONNECTION_ID - The ID of connection(connection id should be in the format "/subscriptions/<sub-id>/resourceGroups/<your-rg-name>/providers/Microsoft.CognitiveServices/accounts/<your-ai-services-name>/projects/<your-project-name>/connections/<your-connection-name>")
5353

samples/microsoft/python/getting-started-agents/3p-tools/Trademo_Global_trade/logo.svg

Lines changed: 0 additions & 11 deletions
This file was deleted.

samples/microsoft/python/getting-started-agents/3p-tools/Trademo_Global_trade/trademo_and_tariff.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373
run_steps = project_client.agents.run_steps.list(thread_id=thread.id, run_id=run.id)
7474

7575
# Loop through each step to display information
76-
for step in run_steps.data:
76+
for step in run_steps:
7777
print(f"Step {step['id']} status: {step['status']}")
7878

7979
# Check if there are tool calls recorded in the step details
@@ -100,5 +100,6 @@
100100

101101
# Fetch and log all messages exchanged during the conversation thread
102102
messages = project_client.agents.messages.list(thread_id=thread.id)
103-
print(f"Messages: {messages}")
103+
for message in messages:
104+
print(f"Message ID: {message.id}, Role: {message.role}, Content: {message.content}")
104105
# </cleanup>

0 commit comments

Comments
 (0)