MineDojo / Voyager

An Open-Ended Embodied Agent with Large Language Models

Home Page:https://voyager.minedojo.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`openai` has no `ChatCompletion` attribute

SomeoneSon opened this issue · comments

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)

solved

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