hey-chatgpt-cli icon indicating copy to clipboard operation
hey-chatgpt-cli copied to clipboard

Dependency versions

Open tm-a-t opened this issue 1 year ago • 1 comments

I guess setup.py misses specified version of dependencies. I installed Hey with pipx and got invalid version of open-ai library.

You tried to access openai.ChatCompletion, but this is no longer supported in openai>=1.0.0 - see the README at https://github.com/openai/openai-python for the API.

You can run `openai migrate` to automatically upgrade your codebase to use the 1.0.0 interface. 

Alternatively, you can pin your installation to the old version, e.g. `pip install openai==0.28`

Manual installation helped:

pipx inject hey-gpt openai==0.28

By the way, the project looks awesome.

tm-a-t avatar Mar 06 '24 12:03 tm-a-t

The comment above helped, though I needed --force to finish the job:

$ pipx inject hey-gpt openai==0.28
⚠️ openai already seems to be injected in 'hey-gpt'. Not modifying existing installation in
'<homedir>/.local/share/pipx/venvs/hey-gpt'. Pass '--force' to force installation.
$ pipx inject --force hey-gpt openai==0.28
  injected package openai into venv hey-gpt
done!

Dulani avatar Aug 29 '24 11:08 Dulani