Skip to content

Commit 19ba455

Browse files
authored
Format and rename samples (#43819)
1 parent fceab57 commit 19ba455

File tree

5 files changed

+116
-106
lines changed

5 files changed

+116
-106
lines changed

sdk/ai/azure-ai-projects/samples/agents/sample_agent_memory.py renamed to sdk/ai/azure-ai-projects/samples/agents/memory/sample_agent_memory.py

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,32 @@
1-
# # ------------------------------------
2-
# # Copyright (c) Microsoft Corporation.
3-
# # Licensed under the MIT License.
4-
# # ------------------------------------
5-
6-
# """
7-
# DESCRIPTION:
8-
# This sample demonstrates how to integrate memory into a prompt agent.
9-
# USAGE:
10-
# python sample_agent_memory.py
11-
12-
# Before running the sample:
13-
# pip install python-dotenv azure-identity azure-ai-projects>=2.0.0b1
14-
15-
# Deploy a chat model (e.g. gpt-4.1) and an embedding model (e.g. text-embedding-3-small).
16-
# Once you have deployed models, set the deployment name in the variables below.
17-
18-
# Set these environment variables with your own values:
19-
# 1) AZURE_AI_PROJECT_ENDPOINT - The Azure AI Project endpoint, as found in the Overview
20-
# page of your Azure AI Foundry portal.
21-
# 2) AZURE_AI_AGENT_MODEL_DEPLOYMENT_NAME - The deployment name of the chat model for the agent, as found under the "Name" column in
22-
# the "Models + endpoints" tab in your Azure AI Foundry project.
23-
# 3) AZURE_AI_CHAT_MODEL_DEPLOYMENT_NAME - The deployment name of the chat model for memory, as found under the "Name" column in
24-
# the "Models + endpoints" tab in your Azure AI Foundry project.
25-
# 4) AZURE_AI_EMBEDDING_MODEL_DEPLOYMENT_NAME - The deployment name of the embedding model for memory, as found under the
26-
# "Name" column in the "Models + endpoints" tab in your Azure AI Foundry project.
27-
# """
1+
# ------------------------------------
2+
# Copyright (c) Microsoft Corporation.
3+
# Licensed under the MIT License.
4+
# ------------------------------------
5+
6+
"""
7+
DESCRIPTION:
8+
This sample demonstrates how to integrate memory into a prompt agent.
9+
10+
USAGE:
11+
python sample_agent_memory.py
12+
13+
Before running the sample:
14+
15+
pip install "azure-ai-projects>=2.0.0b1" azure-identity python-dotenv
16+
17+
Deploy a chat model (e.g. gpt-4.1) and an embedding model (e.g. text-embedding-3-small).
18+
Once you have deployed models, set the deployment name in the variables below.
19+
20+
Set these environment variables with your own values:
21+
1) AZURE_AI_PROJECT_ENDPOINT - The Azure AI Project endpoint, as found in the Overview
22+
page of your Azure AI Foundry portal.
23+
2) AZURE_AI_AGENT_MODEL_DEPLOYMENT_NAME - The deployment name of the chat model for the agent, as found under the "Name" column in
24+
the "Models + endpoints" tab in your Azure AI Foundry project.
25+
3) AZURE_AI_CHAT_MODEL_DEPLOYMENT_NAME - The deployment name of the chat model for memory, as found under the "Name" column in
26+
the "Models + endpoints" tab in your Azure AI Foundry project.
27+
4) AZURE_AI_EMBEDDING_MODEL_DEPLOYMENT_NAME - The deployment name of the embedding model for memory, as found under the
28+
"Name" column in the "Models + endpoints" tab in your Azure AI Foundry project.
29+
"""
2830

2931
# import os
3032
# from dotenv import load_dotenv

sdk/ai/azure-ai-projects/samples/agents/sample_memory_advanced.py renamed to sdk/ai/azure-ai-projects/samples/agents/memory/sample_memory_advanced.py

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,30 @@
1-
# # ------------------------------------
2-
# # Copyright (c) Microsoft Corporation.
3-
# # Licensed under the MIT License.
4-
# # ------------------------------------
5-
6-
# """
7-
# DESCRIPTION:
8-
# This sample demonstrates how to interact with the memory store to add and retrieve memory.
9-
# USAGE:
10-
# python sample_memory_advanced.py
11-
12-
# Before running the sample:
13-
# pip install python-dotenv azure-identity azure-ai-projects>=2.0.0b1
14-
15-
# Deploy a chat model (e.g. gpt-4.1) and an embedding model (e.g. text-embedding-3-small).
16-
# Once you have deployed models, set the deployment name in the variables below.
17-
18-
# Set these environment variables with your own values:
19-
# 1) AZURE_AI_PROJECT_ENDPOINT - The Azure AI Project endpoint, as found in the Overview
20-
# page of your Azure AI Foundry portal.
21-
# 2) AZURE_AI_CHAT_MODEL_DEPLOYMENT_NAME - The deployment name of the chat model, as found under the "Name" column in
22-
# the "Models + endpoints" tab in your Azure AI Foundry project.
23-
# 3) AZURE_AI_EMBEDDING_MODEL_DEPLOYMENT_NAME - The deployment name of the embedding model, as found under the
24-
# "Name" column in the "Models + endpoints" tab in your Azure AI Foundry project.
25-
# """
1+
# ------------------------------------
2+
# Copyright (c) Microsoft Corporation.
3+
# Licensed under the MIT License.
4+
# ------------------------------------
5+
6+
"""
7+
DESCRIPTION:
8+
This sample demonstrates how to interact with the memory store to add and retrieve memory.
9+
10+
USAGE:
11+
python sample_memory_advanced.py
12+
13+
Before running the sample:
14+
15+
pip install "azure-ai-projects>=2.0.0b1" azure-identity python-dotenv
16+
17+
Deploy a chat model (e.g. gpt-4.1) and an embedding model (e.g. text-embedding-3-small).
18+
Once you have deployed models, set the deployment name in the variables below.
19+
20+
Set these environment variables with your own values:
21+
1) AZURE_AI_PROJECT_ENDPOINT - The Azure AI Project endpoint, as found in the Overview
22+
page of your Azure AI Foundry portal.
23+
2) AZURE_AI_CHAT_MODEL_DEPLOYMENT_NAME - The deployment name of the chat model, as found under the "Name" column in
24+
the "Models + endpoints" tab in your Azure AI Foundry project.
25+
3) AZURE_AI_EMBEDDING_MODEL_DEPLOYMENT_NAME - The deployment name of the embedding model, as found under the
26+
"Name" column in the "Models + endpoints" tab in your Azure AI Foundry project.
27+
"""
2628

2729
# import os
2830
# from dotenv import load_dotenv

sdk/ai/azure-ai-projects/samples/agents/sample_memory_basic.py renamed to sdk/ai/azure-ai-projects/samples/agents/memory/sample_memory_basic.py

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,30 @@
1-
# # ------------------------------------
2-
# # Copyright (c) Microsoft Corporation.
3-
# # Licensed under the MIT License.
4-
# # ------------------------------------
5-
6-
# """
7-
# DESCRIPTION:
8-
# This sample demonstrates how to interact with the memory store to add and retrieve memory.
9-
# USAGE:
10-
# python sample_memory_basic.py
11-
12-
# Before running the sample:
13-
# pip install python-dotenv azure-identity azure-ai-projects>=2.0.0b1
14-
15-
# Deploy a chat model (e.g. gpt-4.1) and an embedding model (e.g. text-embedding-3-small).
16-
# Once you have deployed models, set the deployment name in the variables below.
17-
18-
# Set these environment variables with your own values:
19-
# 1) AZURE_AI_PROJECT_ENDPOINT - The Azure AI Project endpoint, as found in the Overview
20-
# page of your Azure AI Foundry portal.
21-
# 2) AZURE_AI_CHAT_MODEL_DEPLOYMENT_NAME - The deployment name of the chat model, as found under the "Name" column in
22-
# the "Models + endpoints" tab in your Azure AI Foundry project.
23-
# 3) AZURE_AI_EMBEDDING_MODEL_DEPLOYMENT_NAME - The deployment name of the embedding model, as found under the
24-
# "Name" column in the "Models + endpoints" tab in your Azure AI Foundry project.
25-
# """
1+
# ------------------------------------
2+
# Copyright (c) Microsoft Corporation.
3+
# Licensed under the MIT License.
4+
# ------------------------------------
5+
6+
"""
7+
DESCRIPTION:
8+
This sample demonstrates how to interact with the memory store to add and retrieve memory.
9+
10+
USAGE:
11+
python sample_memory_basic.py
12+
13+
Before running the sample:
14+
15+
pip install "azure-ai-projects>=2.0.0b1" azure-identity python-dotenv
16+
17+
Deploy a chat model (e.g. gpt-4.1) and an embedding model (e.g. text-embedding-3-small).
18+
Once you have deployed models, set the deployment name in the variables below.
19+
20+
Set these environment variables with your own values:
21+
1) AZURE_AI_PROJECT_ENDPOINT - The Azure AI Project endpoint, as found in the Overview
22+
page of your Azure AI Foundry portal.
23+
2) AZURE_AI_CHAT_MODEL_DEPLOYMENT_NAME - The deployment name of the chat model, as found under the "Name" column in
24+
the "Models + endpoints" tab in your Azure AI Foundry project.
25+
3) AZURE_AI_EMBEDDING_MODEL_DEPLOYMENT_NAME - The deployment name of the embedding model, as found under the
26+
"Name" column in the "Models + endpoints" tab in your Azure AI Foundry project.
27+
"""
2628

2729
# import os
2830
# from dotenv import load_dotenv

sdk/ai/azure-ai-projects/samples/agents/sample_memory_crud.py renamed to sdk/ai/azure-ai-projects/samples/agents/memory/sample_memory_crud.py

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,27 @@
1-
# # ------------------------------------
2-
# # Copyright (c) Microsoft Corporation.
3-
# # Licensed under the MIT License.
4-
# # ------------------------------------
5-
6-
# """
7-
# DESCRIPTION:
8-
# This sample demonstrates how to perform CRUD operations on a memory store using the Azure AI Projects SDK.
9-
# USAGE:
10-
# python sample_memory_crud.py
11-
12-
# Before running the sample:
13-
# pip install python-dotenv azure-identity azure-ai-projects>=2.0.0b1
14-
15-
# Set these environment variables with your own values:
16-
# 1) AZURE_AI_PROJECT_ENDPOINT - The Azure AI Project endpoint, as found in the Overview
17-
# page of your Azure AI Foundry portal.
18-
# 2) AZURE_AI_CHAT_MODEL_DEPLOYMENT_NAME - The deployment name of the chat model, as found under the "Name" column in
19-
# the "Models + endpoints" tab in your Azure AI Foundry project.
20-
# 3) AZURE_AI_EMBEDDING_MODEL_DEPLOYMENT_NAME - The deployment name of the embedding model, as found under the
21-
# "Name" column in the "Models + endpoints" tab in your Azure AI Foundry project.
22-
# """
1+
# ------------------------------------
2+
# Copyright (c) Microsoft Corporation.
3+
# Licensed under the MIT License.
4+
# ------------------------------------
5+
6+
"""
7+
DESCRIPTION:
8+
This sample demonstrates how to perform CRUD operations on a memory store using the Azure AI Projects SDK.
9+
10+
USAGE:
11+
python sample_memory_crud.py
12+
13+
Before running the sample:
14+
15+
pip install "azure-ai-projects>=2.0.0b1" azure-identity python-dotenv
16+
17+
Set these environment variables with your own values:
18+
1) AZURE_AI_PROJECT_ENDPOINT - The Azure AI Project endpoint, as found in the Overview
19+
page of your Azure AI Foundry portal.
20+
2) AZURE_AI_CHAT_MODEL_DEPLOYMENT_NAME - The deployment name of the chat model, as found under the "Name" column in
21+
the "Models + endpoints" tab in your Azure AI Foundry project.
22+
3) AZURE_AI_EMBEDDING_MODEL_DEPLOYMENT_NAME - The deployment name of the embedding model, as found under the
23+
"Name" column in the "Models + endpoints" tab in your Azure AI Foundry project.
24+
"""
2325

2426
# import os
2527
# from dotenv import load_dotenv

sdk/ai/azure-ai-projects/samples/agents/sample_mcp_tool.py renamed to sdk/ai/azure-ai-projects/samples/agents/sample_mcp_tool_async_.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,19 @@
66
"""
77
DESCRIPTION:
88
This sample demonstrates how to interact with the Foundry Project MCP tool.
9+
910
USAGE:
10-
python sample_mcp_tool.py
11+
python sample_mcp_tool_async.py
1112
1213
Before running the sample:
13-
pip install python-dotenv azure-identity azure-ai-projects>=2.0.0b1 mcp
1414
15-
Set these environment variables with your own values:
16-
1) AZURE_AI_PROJECT_ENDPOINT - The Azure AI Project endpoint, as found in the Overview
17-
page of your Azure AI Foundry portal.
18-
2) IMAGE_GEN_DEPLOYMENT_NAME - The deployment name of the image generation model, as found under the "Name" column in
19-
the "Models + endpoints" tab in your Azure AI Foundry project.
15+
pip install "azure-ai-projects>=2.0.0b1" azure-identity python-dotenv mcp
16+
17+
Set these environment variables with your own values:
18+
1) AZURE_AI_PROJECT_ENDPOINT - The Azure AI Project endpoint, as found in the Overview
19+
page of your Azure AI Foundry portal.
20+
2) IMAGE_GEN_DEPLOYMENT_NAME - The deployment name of the image generation model, as found under the "Name" column in
21+
the "Models + endpoints" tab in your Azure AI Foundry project.
2022
"""
2123

2224
import asyncio

0 commit comments

Comments
 (0)