fix and unify devui samples (#5025)

This commit is contained in:
Eduard van Valkenburg
2026-04-01 15:47:20 +02:00
committed by GitHub
Unverified
parent cee0a458fe
commit 2cb78ea12e
28 changed files with 169 additions and 217 deletions
@@ -20,6 +20,7 @@ from agent_framework import (
)
from agent_framework.devui import serve
from agent_framework.foundry import FoundryChatClient
from azure.identity.aio import AzureCliCredential
from dotenv import load_dotenv
from typing_extensions import Never
@@ -80,14 +81,13 @@ def main():
# Create Azure OpenAI chat client
client = FoundryChatClient(
api_key=os.environ.get("AZURE_OPENAI_API_KEY"),
model=os.environ["FOUNDRY_MODEL"],
endpoint=os.environ.get("AZURE_OPENAI_ENDPOINT"),
api_version=os.environ.get("AZURE_OPENAI_API_VERSION", "2024-10-21"),
project_endpoint=os.environ.get("FOUNDRY_PROJECT_ENDPOINT"),
credential=AzureCliCredential(),
)
# Create agents
weather_agent = Agent(
weather_assistant = Agent(
name="weather-assistant",
description="Provides weather information and time",
instructions=(
@@ -120,7 +120,7 @@ def main():
)
# Collect entities for serving
entities = [weather_agent, simple_agent, basic_workflow]
entities = [weather_assistant, simple_agent, basic_workflow]
logger.info("Starting DevUI on http://localhost:8090")
logger.info("Entities available:")