mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Fix docstring/load_dotenv ordering in foundry samples and add try/finally cleanup
Agent-Logs-Url: https://github.com/microsoft/agent-framework/sessions/382df85c-cf3c-4802-97e0-a6df35fc9876 Co-authored-by: chetantoshniwal <255221507+chetantoshniwal@users.noreply.github.com>
This commit is contained in:
committed by
Eduard van Valkenburg
Unverified
parent
bbae6401b1
commit
e26c3580fb
@@ -7,8 +7,6 @@ from agent_framework.foundry import FoundryAgent
|
||||
from azure.identity import AzureCliCredential
|
||||
from dotenv import load_dotenv
|
||||
|
||||
# Load environment variables from .env file
|
||||
load_dotenv()
|
||||
"""
|
||||
Foundry Agent — Connect to a pre-configured agent in Microsoft Foundry
|
||||
|
||||
@@ -22,6 +20,9 @@ Environment variables:
|
||||
FOUNDRY_AGENT_VERSION — Version of the agent (optional, for PromptAgents)
|
||||
"""
|
||||
|
||||
# Load environment variables from .env file
|
||||
load_dotenv()
|
||||
|
||||
|
||||
async def main() -> None:
|
||||
agent = FoundryAgent(
|
||||
|
||||
Reference in New Issue
Block a user