You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/ai-services/agents/concepts/tracing.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,12 +26,12 @@ Tracing solves this by allowing you to clearly see the inputs and outputs of eac
26
26
The Agents playground in the Azure AI Foundry portal lets you trace threads and runs that your agents produce. To open a trace, select **Thread info** in an active thread. You can also optionally select **Metrics** to enable automatic evaluations of the model's performance across several dimensions of **AI quality** and **Risk and safety**.
27
27
28
28
> [!NOTE]
29
-
> * Evaluations are available for 24 hours after they're generated.
29
+
> Evaluation results are available for 24 hours before expiring. To get evaluation results, select your desired metrics and chat with your agent.
30
30
> * Evaluations are not available in the following regions.
31
-
> * australiaeast
32
-
> * japaneast
33
-
> * southindia
34
-
> * uksouth
31
+
> *`australiaeast`
32
+
> *`japaneast`
33
+
> *`southindia`
34
+
> *`uksouth`
35
35
36
36
:::image type="content" source="../media/ai-foundry-tracing.png" alt-text="A screenshot of the agent playground in the Azure AI Foundry portal." lightbox="../media/ai-foundry-tracing.png":::
`HostName` can be found by navigating to your `discovery_url` and removing the leading `https://` and trailing `/discovery`. To find your `discovery_url`, run this CLI command:
> You can also find your connection string in the **overview** for your project in the [Azure AI Foundry portal](https://ai.azure.com/), under **Libraries** > **Azure AI Foundry**.
12
+
> :::image type="content" source="../media/quickstart/portal-endpoint-string.png" alt-text="A screenshot showing the connection string in the Azure AI Foundry portal." lightbox="../media/quickstart/portal-endpoint-string.png":::
Copy file name to clipboardExpand all lines: articles/ai-services/agents/includes/quickstart-csharp.md
+6-12Lines changed: 6 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,23 +57,17 @@ Next, to authenticate your API requests and run the program, use the [az login](
57
57
az login
58
58
```
59
59
60
-
Use the following code to create and run an agent. To run this code, you will need to create a connection string using information from your project. This string is in the format:
60
+
Use the following code to create and run an agent. To run this code, you will need to get the endpoint for your project. This string is in the format:
`HostName` can be found by navigating to your `discovery_url` and removing the leading `https://` and trailing `/discovery`. To find your `discovery_url`, run this CLI command:
67
-
68
-
```azurecli
69
-
az ml workspace show -n {project_name} --resource-group {resource_group_name} --query discovery_url
`HostName` can be found by navigating to your `discovery_url` and removing the leading `https://` and trailing `/discovery`. To find your `discovery_url`, run this CLI command:
`HostName` can be found by navigating to your `discovery_url` and removing the leading `https://` and trailing `/discovery`. To find your `discovery_url`, run this CLI command:
Copy file name to clipboardExpand all lines: articles/ai-services/agents/includes/quickstart-python.md
+49-79Lines changed: 49 additions & 79 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -48,104 +48,74 @@ Next, to authenticate your API requests and run the program, use the [az login](
48
48
az login
49
49
```
50
50
51
-
Use the following code to create and run an agent. To run this code, you will need to create a connection string using information from your project. This string is in the format:
51
+
Use the following code to create and run an agent. To run this code, you will need to get the endpoint for your project. This string is in the format:
`HostName` can be found by navigating to your `discovery_url` and removing the leading `https://` and trailing `/discovery`. To find your `discovery_url`, run this CLI command:
58
-
59
-
```azurecli
60
-
az ml workspace show -n {project_name} --resource-group {resource_group_name} --query discovery_url
# The CodeInterpreterTool needs to be included in creation of the agent
84
+
with project_client:
85
+
# Create an agent with custom functions
93
86
agent = project_client.agents.create_agent(
94
-
model="gpt-4o-mini",
87
+
model=os.environ["MODEL_DEPLOYMENT_NAME"],
95
88
name="my-agent",
96
-
instructions="You are helpful agent",
97
-
tools=code_interpreter.definitions,
98
-
tool_resources=code_interpreter.resources,
89
+
instructions="You are a helpful agent"
99
90
)
100
-
print(f"Created agent, agent ID: {agent.id}")
91
+
print(f"Created agent, ID: {agent.id}")
101
92
102
-
# Create a thread
103
-
thread = project_client.agents.create_thread()
104
-
print(f"Created thread, thread ID: {thread.id}")
93
+
# Create a thread for communication
94
+
thread = project_client.agents.threads.create()
95
+
print(f"Created thread, ID: {thread.id}")
105
96
106
-
# Create a message
107
-
message = project_client.agents.create_message(
108
-
thread_id=thread.id,
109
-
role="user",
110
-
content="Could you please create a bar chart for the operating profit using the following data and provide the file to me? Company A: $1.2 million, Company B: $2.5 million, Company C: $3.0 million, Company D: $1.8 million",
`HostName` can be found by navigating to your `discovery_url` and removing the leading `https://` and trailing `/discovery`. To find your `discovery_url`, run this CLI command:
0 commit comments