Open luohao123 opened 8 months ago
The problem could be that you are using the public pip version pyautogen=0.2.2
, which doesn't support the function decorators. You can clone the repo then install it with pip install -e .
from the autogen dir.
@rickyloynd-microsoft When will the latest master code on pypi?
Also, when using default docker run python code, always have this error:
import requests ModuleNotFoundError: No module named 'requests'
I can not say it's LLM produces error, but requests is just system lib, why it runs error like this
@rickyloynd-microsoft When will the latest master code on pypi?
We don't have a date, but almost certainly within 2 weeks.
Also, when using default docker run python code, always have this error:
import requests ModuleNotFoundError: No module named 'requests'
I can not say it's LLM produces error, but requests is just system lib, why it runs error like this
Are you able to run the sample code here without docker?
I don't know, but as a common sense, requests should can be used out of box in python3
To identify your problem, please start with the simple example here before attempting docker.
If I run the simple example suggested by rickyloynd-microsoft I get this:
ImportError Traceback (most recent call last)
Cell In[8], [line 1](vscode-notebook-cell:?execution_count=8&line=1)
----> [1](vscode-notebook-cell:?execution_count=8&line=1) from autogen import ConversableAgent, UserProxyAgent, config_list_from_json
[4](vscode-notebook-cell:?execution_count=8&line=4) def main():
[5](vscode-notebook-cell:?execution_count=8&line=5) # Load LLM inference endpoints from an env variable or a file
[6](vscode-notebook-cell:?execution_count=8&line=6) # See https://microsoft.github.io/autogen/docs/FAQ#set-your-api-endpoints
[7](vscode-notebook-cell:?execution_count=8&line=7) # and OAI_CONFIG_LIST_sample.
[8](vscode-notebook-cell:?execution_count=8&line=8) # For example, if you have created a OAI_CONFIG_LIST file in the current working directory, that file will be used.
[9](vscode-notebook-cell:?execution_count=8&line=9) config_list = config_list #config_list_from_json(env_or_file="OAI_CONFIG_LIST")
ImportError: cannot import name 'ConversableAgent' from 'autogen' (unknown location)
So the code is still not available at pypi?
@nise could you try pip install -U pyautogen==0.2.29
?
@luohao123
I don't know, but as a common sense, requests should can be used out of box in python3
The requests module has never been a part of the python3 standard library : https://pypi.org/project/requests/ You're probably mixing it up with urllib.request
The example code have errors
AttributeError: 'UserProxyAgent' object has no attribute 'register_for_execution'
https://github.com/microsoft/autogen/blob/main/notebook/agentchat_function_call_currency_calculator.ipynb
Please edit it avoid misleading new comer users.