ymcui / Chinese-LLaMA-Alpaca-2

中文LLaMA-2 & Alpaca-2大模型二期项目 + 64K超长上下文模型 (Chinese LLaMA-2 & Alpaca-2 LLMs with 64K long context models)
Apache License 2.0
7.04k stars 581 forks source link

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. #440

Closed zollty closed 8 months ago

zollty commented 9 months ago

Check before submitting issues

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](https://github.com/openai/openai-python/discussions/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时出错

ymcui commented 9 months ago

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

github-actions[bot] commented 8 months ago

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.

github-actions[bot] commented 8 months ago

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