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

openai version in the pip distribution? #543

Closed
simonff opened this issue Dec 25, 2023 · 2 comments · Fixed by #551
Closed

openai version in the pip distribution? #543

simonff opened this issue Dec 25, 2023 · 2 comments · Fixed by #551
Assignees
Labels
enhancement New feature or request

Comments

@simonff
Copy link

simonff commented Dec 25, 2023

Hi - I'm confused about the version of the openai library that jupyter_ai requires when fetched with 'pip install'. It wants a 0.26-compatible version, and if I have the modern 1.6.1 installed, I get this error:
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. jupyter-ai 2.7.1 requires openai~=0.26, but you have openai 1.6.1 which is incompatible.

Am I doing something wrong?

@simonff simonff added the bug Something isn't working label Dec 25, 2023
Copy link

welcome bot commented Dec 25, 2023

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@JasonWeill JasonWeill self-assigned this Dec 27, 2023
@JasonWeill
Copy link
Collaborator

@simonff Thank you for opening this issue! Upgrading to openai version 1 would be a good improvement. I've upgraded my dependency locally, and I've run openai migrate to update the code in Jupyter AI, but I'm still seeing an error when running a magic command:

APIRemovedInV1: 

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`

A detailed migration guide is available here: https://github.com/openai/openai-python/discussions/742

I can take another look at this soon. If you find a mitigation for this error, please open a pull request, and we will consider incorporating it. Thank you for your interest in Jupyter AI!

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

Successfully merging a pull request may close this issue.

2 participants