Skip to content
Merged
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
43 changes: 43 additions & 0 deletions sdk/ai/azure-ai-projects/.env.template
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,14 @@ SHAREPOINT_USER_INPUT=
FABRIC_USER_INPUT=
BING_CUSTOM_USER_INPUT=
A2A_USER_INPUT=
A2A_ENDPOINT=
EVALUATOR_NAME=
DATASET_NAME=
DATASET_VERSION=
DATASET_VERSION_1=
DATASET_VERSION_2=
DATA_FOLDER=
DOWNLOAD_FOLDER=
POLL_INTERVAL_SECONDS=
EVAL_MODEL=
OPTIMIZATION_MODEL=
Expand All @@ -57,6 +62,44 @@ WORK_IQ_PROJECT_CONNECTION_ID=
WORK_IQ_USER_INPUT=
FABRIC_IQ_PROJECT_CONNECTION_ID=
FABRIC_IQ_USER_INPUT=
AI_SEARCH_CONNECTION_NAME=
INDEX_NAME=
INDEX_VERSION=
FILE_PATH=
AGENT_ID=
APPINSIGHTS_RESOURCE_ID=
TRACE_LOOKBACK_HOURS=
FOUNDRY_AGENT_VERSION=
FOUNDRY_CONVERSATION_IDS=
FOUNDRY_TRACE_IDS=
FOUNDRY_INSTANT_MODEL_NAME=
FOUNDRY_REFERENCE_DATASET_NAME=
FOUNDRY_REFERENCE_DATASET_VERSION=
FOUNDRY_TRACES_WINDOW_DAYS=
AZURE_AI_PROJECT_ENDPOINT=
AZURE_AI_MODEL_DEPLOYMENT_NAME=
AZURE_AI_MODEL_DEPLOYMENT_NAME_FOR_AUDIO=
ENDPOINT_URL=
ENDPOINT_API_KEY=
ENDPOINT_APP_ID=
AZURE_RESOURCE_GROUP_NAME=
MODEL_PUBLISHER=
MODEL_VERSION=
MODEL_ENDPOINT=
MODEL_API_KEY=
COMPUTER_USE_MODEL_DEPLOYMENT_NAME=
STORAGE_INPUT_QUEUE_NAME=
STORAGE_OUTPUT_QUEUE_NAME=
STORAGE_QUEUE_SERVICE_ENDPOINT=
DELEGATED_USER_IDENTITY=
DELEGATED_USER_IDENTITY_2=
FOUNDRY_HOSTED_AGENT_REMOTE_BUILD=
GITHUB_CONNECTION_NAME=
GITHUB_PAT_TOKEN=
GITHUB_REPOSITORY_NAME=
GITHUB_USERNAME=
TEAMS_CONNECTION_NAME=
TEAMS_CHANNEL_URL=

#######################################################################
#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
load_dotenv()

endpoint = os.environ["FOUNDRY_PROJECT_ENDPOINT"]
agent_name = os.environ.get("FOUNDRY_AGENT_NAME", "MyAgent")
agent_name = os.environ.get("FOUNDRY_AGENT_NAME") or "MyAgent"

with (
DefaultAzureCredential() as credential,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

endpoint = os.environ["FOUNDRY_PROJECT_ENDPOINT"]
model = os.environ["FOUNDRY_MODEL_NAME"]
agent_name = os.environ.get("FOUNDRY_AGENT_NAME", "MyAgent")
agent_name = os.environ.get("FOUNDRY_AGENT_NAME") or "MyAgent"
with (
DefaultAzureCredential() as credential,
AIProjectClient(endpoint=endpoint, credential=credential) as project_client,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

endpoint = os.environ["FOUNDRY_PROJECT_ENDPOINT"]
model = os.environ["FOUNDRY_MODEL_NAME"]
agent_name = os.environ.get("FOUNDRY_AGENT_NAME", "MyAgent")
agent_name = os.environ.get("FOUNDRY_AGENT_NAME") or "MyAgent"


async def main():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
load_dotenv()

endpoint = os.environ["FOUNDRY_PROJECT_ENDPOINT"]
agent_name = os.environ.get("FOUNDRY_AGENT_NAME", "MyAgent")
agent_name = os.environ.get("FOUNDRY_AGENT_NAME") or "MyAgent"

with (
DefaultAzureCredential() as credential,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class CalendarEvent(BaseModel):


endpoint = os.environ["FOUNDRY_PROJECT_ENDPOINT"]
agent_name = os.environ.get("FOUNDRY_AGENT_NAME", "MyAgent")
agent_name = os.environ.get("FOUNDRY_AGENT_NAME") or "MyAgent"

with (
DefaultAzureCredential() as credential,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
load_dotenv()

agent = None
agent_name = os.environ.get("FOUNDRY_AGENT_NAME", "MyAgent")
agent_name = os.environ.get("FOUNDRY_AGENT_NAME") or "MyAgent"
Comment thread
dargilco marked this conversation as resolved.

with (
DefaultAzureCredential() as credential,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
load_dotenv()

endpoint = os.environ["FOUNDRY_PROJECT_ENDPOINT"]
agent_name = os.environ.get("FOUNDRY_AGENT_NAME", "MyAgent")
agent_name = os.environ.get("FOUNDRY_AGENT_NAME") or "MyAgent"


tool = AzureAISearchTool(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
agent = None

endpoint = os.environ["FOUNDRY_PROJECT_ENDPOINT"]
agent_name = os.environ.get("FOUNDRY_AGENT_NAME", "MyAgent")
agent_name = os.environ.get("FOUNDRY_AGENT_NAME") or "MyAgent"


tool = AzureFunctionTool(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
load_dotenv()

endpoint = os.environ["FOUNDRY_PROJECT_ENDPOINT"]
agent_name = os.environ.get("FOUNDRY_AGENT_NAME", "MyAgent")
agent_name = os.environ.get("FOUNDRY_AGENT_NAME") or "MyAgent"


tool = BingCustomSearchPreviewTool(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
load_dotenv()

endpoint = os.environ["FOUNDRY_PROJECT_ENDPOINT"]
agent_name = os.environ.get("FOUNDRY_AGENT_NAME", "MyAgent")
agent_name = os.environ.get("FOUNDRY_AGENT_NAME") or "MyAgent"


tool = BingGroundingTool(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
load_dotenv()

endpoint = os.environ["FOUNDRY_PROJECT_ENDPOINT"]
agent_name = os.environ.get("FOUNDRY_AGENT_NAME", "MyAgent")
agent_name = os.environ.get("FOUNDRY_AGENT_NAME") or "MyAgent"


tool = BrowserAutomationPreviewTool(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
load_dotenv()

endpoint = os.environ["FOUNDRY_PROJECT_ENDPOINT"]
agent_name = os.environ.get("FOUNDRY_AGENT_NAME", "MyAgent")
agent_name = os.environ.get("FOUNDRY_AGENT_NAME") or "MyAgent"

with (
DefaultAzureCredential() as credential,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
load_dotenv()

endpoint = os.environ["FOUNDRY_PROJECT_ENDPOINT"]
agent_name = os.environ.get("FOUNDRY_AGENT_NAME", "MyAgent")
agent_name = os.environ.get("FOUNDRY_AGENT_NAME") or "MyAgent"


async def main() -> None:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ async def main() -> None:

# Create agent with code interpreter tool
agent = await project_client.agents.create_version(
agent_name=os.environ.get("FOUNDRY_AGENT_NAME", "MyAgent"),
agent_name=os.environ.get("FOUNDRY_AGENT_NAME") or "MyAgent",
definition=PromptAgentDefinition(
model=os.environ["FOUNDRY_MODEL_NAME"],
instructions="You are a helpful assistant.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
load_dotenv()

endpoint = os.environ["FOUNDRY_PROJECT_ENDPOINT"]
agent_name = os.environ.get("FOUNDRY_AGENT_NAME", "MyAgent")
agent_name = os.environ.get("FOUNDRY_AGENT_NAME") or "MyAgent"

# Initialize state machine
current_state = SearchState.INITIAL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
load_dotenv()

endpoint = os.environ["FOUNDRY_PROJECT_ENDPOINT"]
agent_name = os.environ.get("FOUNDRY_AGENT_NAME", "MyAgent")
agent_name = os.environ.get("FOUNDRY_AGENT_NAME") or "MyAgent"


async def main():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
load_dotenv()

endpoint = os.environ["FOUNDRY_PROJECT_ENDPOINT"]
agent_name = os.environ.get("FOUNDRY_AGENT_NAME", "MyAgent")
agent_name = os.environ.get("FOUNDRY_AGENT_NAME") or "MyAgent"

tool = MicrosoftFabricPreviewTool(
fabric_dataagent_preview=FabricDataAgentToolParameters(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
load_dotenv()

endpoint = os.environ["FOUNDRY_PROJECT_ENDPOINT"]
agent_name = os.environ.get("FOUNDRY_AGENT_NAME", "MyAgent")
agent_name = os.environ.get("FOUNDRY_AGENT_NAME") or "MyAgent"

tool_payload = FabricIQPreviewTool(
project_connection_id=os.environ["FABRIC_IQ_PROJECT_CONNECTION_ID"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@

# Create agent with file search tool
agent = project_client.agents.create_version(
agent_name=os.environ.get("FOUNDRY_AGENT_NAME", "MyAgent"),
agent_name=os.environ.get("FOUNDRY_AGENT_NAME") or "MyAgent",
definition=agent_definition,
description="File search agent for product information queries.",
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

load_dotenv()

agent_name = os.environ.get("FOUNDRY_AGENT_NAME", "MyAgent")
agent_name = os.environ.get("FOUNDRY_AGENT_NAME") or "MyAgent"


def get_horoscope(sign: str) -> str:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
load_dotenv()

endpoint = os.environ["FOUNDRY_PROJECT_ENDPOINT"]
agent_name = os.environ.get("FOUNDRY_AGENT_NAME", "MyAgent")
agent_name = os.environ.get("FOUNDRY_AGENT_NAME") or "MyAgent"
image_generation_model = os.environ["IMAGE_GENERATION_MODEL_DEPLOYMENT_NAME"]

tool = ImageGenTool(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@

load_dotenv()
endpoint = os.environ["FOUNDRY_PROJECT_ENDPOINT"]
agent_name = os.environ.get("FOUNDRY_AGENT_NAME", "MyAgent")
agent_name = os.environ.get("FOUNDRY_AGENT_NAME") or "MyAgent"
image_generation_model = os.environ["IMAGE_GENERATION_MODEL_DEPLOYMENT_NAME"]


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
load_dotenv()

endpoint = os.environ["FOUNDRY_PROJECT_ENDPOINT"]
agent_name = os.environ.get("FOUNDRY_AGENT_NAME", "MyAgent")
agent_name = os.environ.get("FOUNDRY_AGENT_NAME") or "MyAgent"

mcp_tool = MCPTool(
server_label="api-specs",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
load_dotenv()

endpoint = os.environ["FOUNDRY_PROJECT_ENDPOINT"]
agent_name = os.environ.get("FOUNDRY_AGENT_NAME", "MyAgent")
agent_name = os.environ.get("FOUNDRY_AGENT_NAME") or "MyAgent"


async def main():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
load_dotenv()

endpoint = os.environ["FOUNDRY_PROJECT_ENDPOINT"]
agent_name = os.environ.get("FOUNDRY_AGENT_NAME", "MyAgent")
agent_name = os.environ.get("FOUNDRY_AGENT_NAME") or "MyAgent"


tool = MCPTool(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
load_dotenv()

endpoint = os.environ["FOUNDRY_PROJECT_ENDPOINT"]
AGENT_NAME = os.environ.get("FOUNDRY_AGENT_NAME", "MyAgent")
AGENT_NAME = os.environ.get("FOUNDRY_AGENT_NAME") or "MyAgent"

credential = DefaultAzureCredential()
project_client = AIProjectClient(endpoint=endpoint, credential=credential)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

load_dotenv()

AGENT_NAME = os.environ.get("FOUNDRY_AGENT_NAME", "MyAgent")
AGENT_NAME = os.environ.get("FOUNDRY_AGENT_NAME") or "MyAgent"


async def main() -> None:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
load_dotenv()

endpoint = os.environ["FOUNDRY_PROJECT_ENDPOINT"]
agent_name = os.environ.get("FOUNDRY_AGENT_NAME", "MyAgent")
agent_name = os.environ.get("FOUNDRY_AGENT_NAME") or "MyAgent"
weather_asset_file_path = Path(__file__).resolve().parent / "../assets/weather_openapi.json"
openapi_weather = cast(dict[str, Any], jsonref.loads(weather_asset_file_path.read_text(encoding="utf-8")))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
load_dotenv()

endpoint = os.environ["FOUNDRY_PROJECT_ENDPOINT"]
agent_name = os.environ.get("FOUNDRY_AGENT_NAME", "MyAgent")
agent_name = os.environ.get("FOUNDRY_AGENT_NAME") or "MyAgent"
tripadvisor_asset_file_path = Path(__file__).resolve().parent / "../assets/tripadvisor_openapi.json"
openapi_tripadvisor = cast(dict[str, Any], jsonref.loads(tripadvisor_asset_file_path.read_text(encoding="utf-8")))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
load_dotenv()

endpoint = os.environ["FOUNDRY_PROJECT_ENDPOINT"]
agent_name = os.environ.get("FOUNDRY_AGENT_NAME", "MyAgent")
agent_name = os.environ.get("FOUNDRY_AGENT_NAME") or "MyAgent"

tool = SharepointPreviewTool(
sharepoint_grounding_preview=SharepointGroundingToolParameters(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
load_dotenv()

endpoint = os.environ["FOUNDRY_PROJECT_ENDPOINT"]
agent_name = os.environ.get("FOUNDRY_AGENT_NAME", "MyAgent")
agent_name = os.environ.get("FOUNDRY_AGENT_NAME") or "MyAgent"

tool = A2APreviewTool(
project_connection_id=os.environ["A2A_PROJECT_CONNECTION_ID"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@


endpoint = os.environ["FOUNDRY_PROJECT_ENDPOINT"]
agent_name = os.environ.get("FOUNDRY_AGENT_NAME", "MyAgent")
agent_name = os.environ.get("FOUNDRY_AGENT_NAME") or "MyAgent"

tool = WebSearchTool(user_location=WebSearchApproximateLocation(country="GB", city="London", region="London"))
with (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@


endpoint = os.environ["FOUNDRY_PROJECT_ENDPOINT"]
agent_name = os.environ.get("FOUNDRY_AGENT_NAME", "MyAgent")
agent_name = os.environ.get("FOUNDRY_AGENT_NAME") or "MyAgent"

tool = WebSearchPreviewTool(user_location=ApproximateLocation(country="GB", city="London", region="London"))
with (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@


endpoint = os.environ["FOUNDRY_PROJECT_ENDPOINT"]
agent_name = os.environ.get("FOUNDRY_AGENT_NAME", "MyAgent")
agent_name = os.environ.get("FOUNDRY_AGENT_NAME") or "MyAgent"

tool = WebSearchTool(
custom_search_configuration=WebSearchConfiguration(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
load_dotenv()

endpoint = os.environ["FOUNDRY_PROJECT_ENDPOINT"]
agent_name = os.environ.get("FOUNDRY_AGENT_NAME", "MyAgent")
agent_name = os.environ.get("FOUNDRY_AGENT_NAME") or "MyAgent"

tool_payload = WorkIQPreviewTool(
project_connection_id=os.environ["WORK_IQ_PROJECT_CONNECTION_ID"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
INNER_MCP_LABEL = "github"
INNER_MCP_URL = "https://api.githubcopilot.com/mcp"
TOOLBOX_MCP_LABEL = "search-tool"
agent_name = os.environ.get("FOUNDRY_AGENT_NAME", "MyAgent")
agent_name = os.environ.get("FOUNDRY_AGENT_NAME") or "MyAgent"


with (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
INNER_MCP_LABEL = "github"
INNER_MCP_URL = "https://api.githubcopilot.com/mcp"
TOOLBOX_MCP_LABEL = "search-tool"
agent_name = os.environ.get("FOUNDRY_AGENT_NAME", "MyAgent")
agent_name = os.environ.get("FOUNDRY_AGENT_NAME") or "MyAgent"


async def main() -> None:
Expand Down
Loading
Loading