MineDojo / Voyager

An Open-Ended Embodied Agent with Large Language Models
https://voyager.minedojo.org/
MIT License
5.53k stars 512 forks source link

`openai` has no `ChatCompletion` attribute #132

Closed SomeoneSon closed 11 months ago

SomeoneSon commented 11 months ago

Have error with 1 start, upgrade lib not help

Traceback (most recent call last): File "C:\Python Projects\Voyager\test.py", line 12, in voyager = Voyager( File "C:\Python Projects\Voyager\voyager\voyager.py", line 118, in init self.action_agent = ActionAgent( File "C:\Python Projects\Voyager\voyager\agents\action.py", line 34, in init self.llm = ChatOpenAI( File "C:\Users\soenon\AppData\Local\Programs\Python\Python310\lib\site-packages\langchain\load\serializable.py", line 97, in init super().init(**kwargs) File "pydantic\main.py", line 341, in pydantic.main.BaseModel.init pydantic.error_wrappers.ValidationError: 1 validation error for ChatOpenAI root openai has no ChatCompletion attribute, this is likely due to an old version of the openai package. Try upgrading it with pip install --upgrade openai. (type=value_error)

SomeoneSon commented 11 months ago

solved

if u have same issue use pip uninstall openai pip install "openai<1.0.0"