Python: Fix samples (#4980)

* First samples 1st batch

* Fix sample paths

* Fix workflow samples

* Fix workflow dependency

* Correct env vars

* Increase idle timeout

* Fix workflows HIL sample

* Fix more workflow samples
This commit is contained in:
Tao Chen
2026-03-31 08:20:35 -07:00
committed by GitHub
Unverified
parent 0f81c277d9
commit 016daf3b98
69 changed files with 234 additions and 306 deletions
@@ -16,7 +16,7 @@ Prerequisites:
- Azure OpenAI deployment with chat completion capability
- Environment variables:
FOUNDRY_PROJECT_ENDPOINT: Your Azure AI Foundry Agent Service (V2) project endpoint
AZURE_AI_MODEL_DEPLOYMENT_NAME: Your model deployment name
FOUNDRY_MODEL: Your model deployment name
"""
import asyncio
@@ -27,8 +27,10 @@ from agent_framework import Agent
from agent_framework.declarative import WorkflowFactory
from agent_framework.foundry import FoundryChatClient
from azure.identity import AzureCliCredential
from dotenv.main import load_dotenv
# Copyright (c) Microsoft. All rights reserved.
# Load environment variables from .env file
load_dotenv()
STUDENT_INSTRUCTIONS = """You are a curious math student working on understanding mathematical concepts.
@@ -58,7 +60,7 @@ async def main() -> None:
# Create chat client
client = FoundryChatClient(
project_endpoint=os.environ["FOUNDRY_PROJECT_ENDPOINT"],
model=os.environ["AZURE_AI_MODEL_DEPLOYMENT_NAME"],
model=os.environ["FOUNDRY_MODEL"],
credential=AzureCliCredential(),
)