Open ligaz opened 1 month ago
@JianxinMa Do you have any thoughts on this one?
@JianxinMa Do you have any thoughts on this one?
Hi, may I ask which dependency in the requirements.txt you find to be particularly troublesome? I will check if it is related to the code interpreter and mark it as optional.
They are:
matplotlib
pillow
jupyter_client
Hello,
Running pip install qwen-agent
by default installs the dependencies for code interpreter.
However, if you prefer not to install these optional dependencies, you can now install qwen-agent with the commands below:
curl -O https://raw.githubusercontent.com/QwenLM/Qwen-Agent/main/requirements.txt
pip install -r requirements.txt
pip install -U --no-deps "qwen-agent>=0.0.6"
P.S.: I'm hesitant to make the code interpreter dependencies optional by default, as some users may voice complaints, particularly those who do not read the README.
@JianxinMa Thanks. I have already workaround this on my end by installing qwen-agent
with --no-deps
and manually listing out all relevant dependencies that are needed for the core functionality.
Nevertheless I do believe it makes more sense to extract different tools into different optional extra packages. For example keywork_search
right now imports jieba
and snowballstemmer
which are not needed if your are not using RAG.
This way you will have the core agent framework and a couple of extra packages for rag
, code_interpreter
, etc.
We should also note that currently the base agent module imports all tools (regarding of whether you are using them or not).
Importing the Agent
class: https://github.com/QwenLM/Qwen-Agent/blob/94431706e5998ee6f4f1afcffc2bed7a7078c2dc/qwen_agent/agent.py#L11
which results in all those imports: https://github.com/QwenLM/Qwen-Agent/blob/94431706e5998ee6f4f1afcffc2bed7a7078c2dc/qwen_agent/tools/__init__.py#L1-L30
We should also note that currently the base agent module imports all tools (regarding of whether you are using them or not).
Importing the
Agent
class:which results in all those imports:
Thanks for the reminder! In version 0.0.6, I have modified the code interpreter-related imports such that they are lazy, meaning they are only imported when actually needed. As for the RAG-related imports, I will make them lazy as well when I have the time.
Currently the Python package for qwen-agent has all the tools including
code_interpreter
. However if you are not using this tool in your setup there is no need to install its dependencies.Consider moving this tool into an optional package like: