How to run “openai migrate” in Space?
I think posted in a wrong group so i am reposting this question here, web admin please delete either inappropriate one.I am deploying a super simple LLM webapp through huggingface’s spaceshttps://huggingface.co/spaces/Lorentz/llm_draftbut it throws me this error: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/742I attempted to specify version 0.28 of openai in my requirements.txt file, but encountered an error indicating that this version does not exist.Subsequently, I modified the version to 0.0.28, which appeared to resolve this particular issue. However, I was then faced with a different error. At this point, I considered using openai migrate, but I’m uncertain about how to proceed.I also checked the discussion atv1.0.0 Migration Guide · openai/openai-python · Discussion #742 · GitHubfor guidance, but couldn’t find information directly relevant to the issue I’m experiencing with huggingface spaces.If anyone could provide assistance on how to address this, it would be greatly appreciated.
2024-01-18T18:12:27Z
hi@Entz, I can’t access your private Space, please double check if you haveopenai==0.28.0on therequirements.txtdoc and that version doesn’t conflict with any other package requirements.
2024-01-18T19:38:30Z
Amazing, it works now. I specified openai==0.28.0 in the requirement.txt file before. but it threw me another error. Anyway, it works now, thank you@radames!
2024-01-19T07:39:06Z
This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.