-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No module named 'azure' -- installation instruction of magentic one needs to be updated #4899
Comments
I was facing the same issue yesterday, Installing azure separately solved it for me
I installed it using this command |
I saw this earlier, it uses azure identity. That is why it may be asking
for it. I think the code may need to be modified to make that azure
identity optional
…On Sun, Jan 5, 2025 at 9:12 PM Not Subhuman ***@***.***> wrote:
I was facing the same issue yesterday, Installing azure separately solved
it for me
pip install azure-storage-blob azure-identity
I installed it using this command
—
Reply to this email directly, view it on GitHub
<#4899 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AD4VIRGWZLKNNA4JFZY3LTD2JIGFRAVCNFSM6AAAAABUUVETDKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNZSGI4DQOJWG4>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Thanks for the issue. This doc should be updated to add autogen/python/packages/autogen-core/docs/src/user-guide/agentchat-user-guide/magentic-one.md Lines 44 to 45 in 2eb46d2
A really quick fix if anyone wants to contribute. |
It's either this, or that azure is used maybe by default also for the Session pool 🤷 |
Thank you, it works now. I really appreciate it! |
The problem still exists despite #4903
|
When I implemented component config support I didn't realize it would make azure libs required when importing the openai client. #4757 so this is my mistake I think the right thing to do here is split out the azure client into I really don't want to force people who just want to use openai to have to install azure libs too... That's not right |
Here is my code:
import os
os.environ["api_key"]="sk-xxxxx"
os.environ["base_url"] = "xxxx"
import asyncio
from autogen_ext.models.openai import OpenAIChatCompletionClient
from autogen_ext.teams.magentic_one import MagenticOne
from autogen_agentchat.ui import Console
async def example_usage_hil():
client = OpenAIChatCompletionClient(model="gpt-4o")
# to enable human-in-the-loop mode, set hil_mode=True
m1 = MagenticOne(client=client, hil_mode=True)
task = "Write a Python script to fetch data from an API."
result = await Console(m1.run_stream(task=task))
print(result)
if name == "main":
asyncio.run(example_usage_hil())
The error is as follows:
Traceback (most recent call last):
File "xx\newCoder\autogen_related\magentic_one\magent_test_1.py", line 6, in
from autogen_ext.models.openai import OpenAIChatCompletionClient
File "D:\python-3.11.6\Lib\site-packages\autogen_ext\models\openai_init_.py", line 1, in
from ._azure_token_provider import AzureTokenProvider
File "D:\python-3.11.6\Lib\site-packages\autogen_ext\models\openai_azure_token_provider.py", line 4, in
from azure.core.credentials import TokenProvider
ModuleNotFoundError: No module named 'azure'
Why is Azure needed here? How should I modify it?
The text was updated successfully, but these errors were encountered: