microsoft / autogen

A programming framework for agentic AI. Discord: https://aka.ms/autogen-dc. Roadmap: https://aka.ms/autogen-roadmap
https://microsoft.github.io/autogen/
Creative Commons Attribution 4.0 International
28.12k stars 4.11k forks source link

[Bug]: pip install "pyautogen[long-context]" does not install what is expected #2756

Open Jonathanpro opened 1 month ago

Jonathanpro commented 1 month ago

Describe the bug

when doing pip install "pyautogen[long-context]" PyMuPDF this should lead to the opportunity to do from autogen.agentchat.contrib.capabilities.text_compressors import LLMLingua in python but this is not possible

Steps to reproduce

Observation : There is no text_compressors.py in ... python3.10/site-packages/autogen/agentchat/contrib/capabilities/

According to repo this file should exist https://github.com/microsoft/autogen/tree/main/autogen/agentchat/contrib/capabilities

Model Used

none

Expected Behavior

blank python env + pip install "pyautogen[long-context]" PyMuPDF should be sufficant to execute from autogen.agentchat.contrib.capabilities.text_compressors import LLMLingua

Screenshots and logs

No response

Additional Information

AutoGen Version: 0.2.27 Operating System: MAC OS 14.5 Python Version: Python 3.10.14

brianpham93 commented 1 month ago

i got the same error

lc82111 commented 1 month ago

me too. How to surround it temporarily?

SaraMashal commented 1 month ago

I faced the same error, as well, its like there are missing files in the directory of "autogen.agentchat.contrib". This was not stated in the documentation as well...

SaraMashal commented 1 month ago

Describe the bug

when doing pip install "pyautogen[long-context]" PyMuPDF this should lead to the opportunity to do from autogen.agentchat.contrib.capabilities.text_compressors import LLMLingua in python but this is not possible

Steps to reproduce

  • Step 1: I try to follow https://microsoft.github.io/autogen/docs/topics/handling_long_contexts/compressing_text_w_llmligua
  • Step 2: I create a venv with python 3.10 on mac
  • Step 3: i installed jupyter - pip install jupyter
  • Step 4: I did pip install "pyautogen[long-context]" PyMuPDF
  • See error: from autogen.agentchat.contrib.capabilities.text_compressors import LLMLingua result into ModuleNotFoundError: No module named 'autogen.agentchat.contrib.capabilities.text_compressors' in jupyter and in shell with python3.10 but import autogen works

Observation : There is no text_compressors.py in ... python3.10/site-packages/autogen/agentchat/contrib/capabilities/

According to repo this file should exist https://github.com/microsoft/autogen/tree/main/autogen/agentchat/contrib/capabilities

Model Used

none

Expected Behavior

blank python env + pip install "pyautogen[long-context]" PyMuPDF should be sufficant to execute from autogen.agentchat.contrib.capabilities.text_compressors import LLMLingua

Screenshots and logs

No response

Additional Information

AutoGen Version: 0.2.27 Operating System: MAC OS 14.5 Python Version: Python 3.10.14

I have just fixed this by upgrading to the latest version of autogen==0.2.28 the dependencies are and successfully imported

jacinli commented 4 weeks ago

Just update the latest pyautogen package.I am OK.