diff --git a/python/samples/01-get-started/05_functional_workflow_with_agents.py b/python/samples/01-get-started/05_functional_workflow_with_agents.py index 7ffb0165c4..9aff97826d 100644 --- a/python/samples/01-get-started/05_functional_workflow_with_agents.py +++ b/python/samples/01-get-started/05_functional_workflow_with_agents.py @@ -12,6 +12,10 @@ from agent_framework import Agent, workflow from agent_framework.foundry import FoundryChatClient from azure.identity import AzureCliCredential +from dotenv import load_dotenv + +# Load environment variables from .env file (e.g., FOUNDRY_PROJECT_ENDPOINT, FOUNDRY_MODEL) +load_dotenv() # client = FoundryChatClient(credential=AzureCliCredential()) diff --git a/python/samples/02-agents/chat_client/chat_response_cancellation.py b/python/samples/02-agents/chat_client/chat_response_cancellation.py index 2a4e17432b..76859831d4 100644 --- a/python/samples/02-agents/chat_client/chat_response_cancellation.py +++ b/python/samples/02-agents/chat_client/chat_response_cancellation.py @@ -24,8 +24,9 @@ async def main() -> None: Creates a task for the chat request, waits briefly, then cancels it to show proper cleanup. Configuration: - - OpenAI model ID: Use "model" parameter or "OPENAI_MODEL" environment variable - - OpenAI API key: Use "api_key" parameter or "OPENAI_API_KEY" environment variable + - FOUNDRY_PROJECT_ENDPOINT: Azure AI Foundry project endpoint URL + - FOUNDRY_MODEL: Model deployment name (e.g. gpt-4o) + - Authentication: Run `az login` to authenticate via AzureCliCredential """ client = FoundryChatClient(credential=AzureCliCredential())