Skip to content

Commit 137b6bc

Browse files
authored
Update agent-evaluate-sdk.md
1 parent ce7b7df commit 137b6bc

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

articles/ai-foundry/how-to/develop/agent-evaluate-sdk.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ from dotenv import load_dotenv
6868

6969
load_dotenv()
7070

71-
# Define some custom python function
71+
# Define a custom Python function.
7272
def fetch_weather(location: str) -> str:
7373
"""
7474
Fetches the weather information for the specified location.
@@ -89,14 +89,14 @@ user_functions: Set[Callable[..., Any]] = {
8989
fetch_weather,
9090
}
9191

92-
# Adding Tools to be used by Agent
92+
# Add tools that agent will use.
9393
functions = FunctionTool(user_functions)
9494

9595
toolset = ToolSet()
9696
toolset.add(functions)
9797

9898

99-
# Create the agent
99+
# Create the agent.
100100
AGENT_NAME = "Seattle Tourist Assistant"
101101

102102
project_client = AIProjectClient.from_connection_string(
@@ -115,7 +115,7 @@ print(f"Created agent, ID: {agent.id}")
115115
thread = project_client.agents.create_thread()
116116
print(f"Created thread, ID: {thread.id}")
117117

118-
# Create message to thread
118+
# Create a message to thread.
119119
MESSAGE = "Can you fetch me the weather in Seattle?"
120120

121121
message = project_client.agents.create_message(
@@ -134,7 +134,7 @@ if run.status == "failed":
134134

135135
print(f"Run ID: {run.id}")
136136

137-
# display messages
137+
# Display messages.
138138
for message in project_client.agents.list_messages(thread.id, order="asc").data:
139139
print(f"Role: {message.role}")
140140
print(f"Content: {message.content[0].text.value}")
@@ -149,10 +149,10 @@ After you create agent runs, you can easily use our converter to transform the A
149149
import json, os
150150
from azure.ai.evaluation import AIAgentConverter, IntentResolutionEvaluator
151151

152-
# Initialize the converter for Azure AI agents
152+
# Initialize the converter for Azure AI agents.
153153
converter = AIAgentConverter(project_client)
154154

155-
# Specify the thread and run id
155+
# Specify the thread and run the ID.
156156
thread_id = thread.id
157157
run_id = run.id
158158

0 commit comments

Comments
 (0)