ymcui/Chinese-LLaMA-Alpaca-2

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.

zollty opened this issue · 3 comments

Check before submitting issues

  • Make sure to pull the latest code, as some issues and bugs have been fixed.
  • I have read the Wiki and FAQ section AND searched for similar issues and did not find a similar problem or solution
  • Third-party plugin issues - e.g., llama.cpp, LangChain, text-generation-webui, we recommend checking the corresponding project for solutions

Type of Issue

Other issues

Base Model

Chinese-Alpaca-2-16K (7B/13B)

Operating System

Linux

Describe your issue in detail

ERROR: APIRemovedInV1: 获取ChatCompletion时出错:when run \server\chat\openai_chat.py

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

my openapi sdk version is
root@ub1:# pip list | grep openai
openai 1.2.3

it's because the new major version of the OpenAI SDK](openai/openai-python#742) that was unleashed in early November 2023.

Dependencies (must be provided for code-related issues)

Chinese-LLaMA-Alpaca-2 lastest version

Execution logs or screenshots

2023-12-05 08:27:13,479 - openai_chat.py[line:52] - ERROR: APIRemovedInV1: 获取ChatCompletion时出错

错误信息已经提示的很明确了,降级openai版本或者自行修改代码适配1.0.0以上版本。

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your consideration.

Closing the issue, since no updates observed. Feel free to re-open if you need any further assistance.