Skip to content

Commit 31cb4d8

Browse files
author
Maryanne Gichohi
committed
Update package version
1 parent d15b704 commit 31cb4d8

2 files changed

Lines changed: 15 additions & 17 deletions

File tree

examples/Python/ChatAgent/app.py

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import asyncio
22
import os
33
from agent_framework.declarative import AgentFactory
4-
from azure.identity.aio import DefaultAzureCredential as AsyncDefaultCredential
54
from azure.identity import DefaultAzureCredential
65
from azure.appconfiguration.provider import load
76

@@ -13,23 +12,22 @@ async def main():
1312

1413
yaml_str = config["ChatAgent:Spec"]
1514

16-
async with (
17-
AsyncDefaultCredential() as credential,
18-
AgentFactory(client_kwargs={"async_credential": credential, "project_endpoint": config["ChatAgent:ProjectEndpoint"]}).create_agent_from_yaml(yaml_str) as agent,
19-
):
20-
while True:
21-
print("How can I help? (type 'quit' to exit)")
15+
agent = AgentFactory(client_kwargs={"credential": credential, "project_endpoint": config["ChatAgent:ProjectEndpoint"]}).create_agent_from_yaml(yaml_str)
2216

23-
user_input = input("User: ")
24-
25-
if user_input.lower() in ['quit', 'exit', 'bye']:
26-
break
17+
while True:
18+
print("How can I help? (type 'quit' to exit)")
2719

28-
response = await agent.run(user_input)
29-
print("Agent response: ", response.text)
30-
input("Press enter to continue...")
20+
user_input = input("User: ")
21+
22+
if user_input.lower() in ['quit', 'exit', 'bye']:
23+
break
24+
25+
response = await agent.run(user_input)
26+
print("Agent response: ", response.text)
27+
input("Press enter to continue...")
28+
3129

3230
print("Exiting... Goodbye...")
3331

3432
if __name__ == "__main__":
35-
asyncio.run(main())
33+
asyncio.run(main())
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
agent-framework-azure-ai==1.0.0b251120
2-
agent-framework-declarative==1.0.0b251120
1+
agent-framework-azure-ai==1.0.0b251211
2+
agent-framework-declarative==1.0.0b251211
33
azure-appconfiguration-provider==2.3.1
44
azure-identity==1.26.0b1

0 commit comments

Comments
 (0)