|
12 | 12 | """ |
13 | 13 |
|
14 | 14 | import asyncio |
15 | | -import logging |
16 | 15 | import os |
17 | 16 | import sys |
18 | 17 |
|
19 | 18 | from agent_framework import Agent, WorkflowBuilder |
20 | 19 | from agent_framework.openai import OpenAIChatClient |
21 | 20 | from azure.identity.aio import DefaultAzureCredential, get_bearer_token_provider |
22 | 21 | from dotenv import load_dotenv |
23 | | -from rich.logging import RichHandler |
24 | | - |
25 | | -log_handler = RichHandler(show_path=False, rich_tracebacks=True, show_level=False) |
26 | | -logging.basicConfig(level=logging.WARNING, handlers=[log_handler], force=True, format="%(message)s") |
27 | | -logger = logging.getLogger(__name__) |
28 | | -logger.setLevel(logging.INFO) |
29 | 22 |
|
30 | 23 | load_dotenv(override=True) |
31 | 24 | API_HOST = os.getenv("API_HOST", "github") |
|
80 | 73 |
|
81 | 74 |
|
82 | 75 | async def main(): |
83 | | - prompt = "Write a LinkedIn post about three practical ways AI agents can improve customer support workflows." |
84 | | - logger.info("Prompt: %s", prompt) |
| 76 | + prompt = 'Write a 2-sentence LinkedIn post: "Why your AI pilot looks good but fails in production."' |
| 77 | + print(f"Prompt: {prompt}\n") |
85 | 78 | events = await workflow.run(prompt) |
86 | | - outputs = events.get_outputs() |
87 | | - for output in outputs: |
88 | | - logger.info("[%s]\n%s", output.executor_id, output.agent_response.text) |
| 79 | + |
| 80 | + for output in events.get_outputs(): |
| 81 | + print("===== Output =====") |
| 82 | + print(output) |
89 | 83 |
|
90 | 84 | if async_credential: |
91 | 85 | await async_credential.close() |
|
0 commit comments