mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Fixing samples with minor changes. 1. Adding model details for Anthropic, 2. Moving to environment variables for endpoint and deployment details
This commit is contained in:
committed by
Eduard van Valkenburg
Unverified
parent
95fd5ec658
commit
30920e1f9d
@@ -1,10 +1,14 @@
|
||||
# Copyright (c) Microsoft. All rights reserved.
|
||||
|
||||
import asyncio
|
||||
import os
|
||||
|
||||
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
|
||||
|
||||
@@ -21,9 +25,9 @@ Environment variables:
|
||||
|
||||
async def main() -> None:
|
||||
agent = FoundryAgent(
|
||||
project_endpoint="https://your-project.services.ai.azure.com",
|
||||
agent_name="my-prompt-agent",
|
||||
agent_version="1.0",
|
||||
project_endpoint=os.environ["FOUNDRY_PROJECT_ENDPOINT"],
|
||||
agent_name=os.environ["FOUNDRY_AGENT_NAME"],
|
||||
agent_version=os.environ["FOUNDRY_AGENT_VERSION"],
|
||||
credential=AzureCliCredential(),
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user