Replies: 1 comment 2 replies
-
|
@pjirsa the following call needs an agent = await provider.create_agent(
name="FoundryWeatherAgent",
instructions="""
You are a weather assistant using Azure AI Foundry models. You can provide
current weather information and forecasts for any location. Always be helpful
and provide detailed weather information when asked.
""",
tools=[get_weather, get_forecast],
) |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The current samples seem to be out of sync with the latest foundry SDKs for loading or creating agents as workflow executors. The agent-framework agent examples demonstrate the latest code which leverages the AzureAIProjectAgentProvider class to create or load agents. However, probably due to my inexperience with Python, I cannot figure out how to use these async functions when trying to declare my agent (or workflow) in the global namespace. If i use asyncio.run, i get an error that I can't do that from an already running loop. If I skip that, I get an error that my entity type is not correct.
Error is:
Error: Entity loading failed: No valid entity foundOR with asyncio
Error is:
Entity loading failed: Failed to load entity 'foundry_agent': asyncio.run() cannot be called from a running event loopBeta Was this translation helpful? Give feedback.
All reactions