Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion sdk/ai/azure-ai-projects/.env.template
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ BROWSER_AUTOMATION_PROJECT_CONNECTION_ID=
OPENAPI_PROJECT_CONNECTION_ID=
AI_SEARCH_USER_INPUT=
SHAREPOINT_USER_INPUT=

FABRIC_SEARCH_USER_INPUT=
BING_CUSTOM_USER_INPUT=
A2A_USER_INPUT=

#######################################################################
#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
3) BING_CUSTOM_SEARCH_PROJECT_CONNECTION_ID - The Bing Custom Search project connection ID,
as found in the "Connections" tab in your Microsoft Foundry project.
4) BING_CUSTOM_SEARCH_INSTANCE_NAME - The Bing Custom Search instance name
5) BING_CUSTOM_USER_INPUT - (Optional) The question to ask. If not set, you will be prompted.
"""

import os
Expand Down Expand Up @@ -72,7 +73,7 @@
)
print(f"Agent created (id: {agent.id}, name: {agent.name}, version: {agent.version})")

user_input = input("Enter your question (e.g., 'Tell me more about foundry agent service'): \n")
user_input = os.environ.get("BING_CUSTOM_USER_INPUT") or input("Enter your question: \n")

# Send initial request that will trigger the Bing Custom Search tool
stream_response = openai_client.responses.create(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
the "Models + endpoints" tab in your Microsoft Foundry project.
3) FABRIC_PROJECT_CONNECTION_ID - The Fabric project connection ID,
as found in the "Connections" tab in your Microsoft Foundry project.
4) FABRIC_SEARCH_USER_INPUT - (Optional) The question to ask. If not set, you will be prompted.
"""

import os
Expand Down Expand Up @@ -65,7 +66,7 @@
)
print(f"Agent created (id: {agent.id}, name: {agent.name}, version: {agent.version})")

user_input = input("Enter your question (e.g., 'Tell me about sales records'): \n")
user_input = os.environ.get("FABRIC_SEARCH_USER_INPUT") or input("Enter your question: \n")

response = openai_client.responses.create(
tool_choice="required",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@
the "Models + endpoints" tab in your Microsoft Foundry project.
3) A2A_PROJECT_CONNECTION_ID - The A2A project connection ID,
as found in the "Connections" tab in your Microsoft Foundry project.
4) (Optional) A2A_ENDPOINT - If the connection is missing target i.e. if it is of "Custom keys" type, we need to set the A2A
4) A2A_ENDPOINT - (Optional) If the connection is missing target i.e. if it is of "Custom keys" type, we need to set the A2A
endpoint on the tool.
5) A2A_USER_INPUT - (Optional) The question to ask. If not set, you will be prompted.
"""

import os
Expand Down Expand Up @@ -66,7 +67,7 @@
)
print(f"Agent created (id: {agent.id}, name: {agent.name}, version: {agent.version})")

user_input = input("Enter your question (e.g., 'What can the secondary agent do?'): \n")
user_input = os.environ.get("A2A_USER_INPUT") or input("Enter your question (e.g., 'What can the secondary agent do?'): \n")

stream_response = openai_client.responses.create(
stream=True,
Expand Down
1 change: 1 addition & 0 deletions sdk/ai/azure-ai-projects/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
if not load_dotenv(find_dotenv(), override=True):
print("Did not find a .env file. Using default environment variable values for tests.")


def pytest_collection_modifyitems(items):
if os.environ.get("AZURE_TEST_RUN_LIVE") == "true":
return
Expand Down
3 changes: 3 additions & 0 deletions sdk/ai/azure-ai-projects/tests/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@
azure_resource_group="sanitized-resource-group",
ai_search_user_input="What is Azure AI Projects?",
sharepoint_user_input="What is SharePoint?",
fabric_user_input="List all customers!",
a2a_user_input="What can the secondary agent do?",
bing_custom_user_input="Tell me more about foundry agent service",
memory_store_chat_model_deployment_name="gpt-4.1-mini",
memory_store_embedding_model_deployment_name="text-embedding-ada-002",
)
Expand Down