Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

P141 error #5

Open
aino-capm opened this issue Nov 19, 2023 · 1 comment
Open

P141 error #5

aino-capm opened this issue Nov 19, 2023 · 1 comment

Comments

@aino-capm
Copy link

エラーの説明


P141の通り実装したところ、以下のエラーが出ました。
バージョンアップしても変わりませんでした。
念の為、Githubのコードをコピペして実行しましたが、同様のエラーが出ます。
よろしくお願いします。

スクリーンショット

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)

書籍の該当箇所

本のタイトル : ChatGPT/LangChainによるチャットシステム構築[実践]入門
ページ : 141

書籍の内容以外で実施したこと

環境

AWS Cloud9

@os1ma
Copy link
Collaborator

os1ma commented Nov 20, 2023

ご質問ありがとうございます。

こちらはopenaiパッケージのバージョンの起因するエラーだと思われます。

パッケージのバージョンに起因するエラーに遭遇しないよう、バージョンを指定してインストールする方法をまとめました。
具体的なコマンドは「こちら(パッケージのバージョン固定に関する変更)」を参照してください。

追加の不明点などあればご質問ください。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants