FudanDISC / DISC-LawLLM

DISC-LawLLM, an intelligent legal system utilizing large language models (LLMs) to provide a wide range of legal services
Apache License 2.0
509 stars 58 forks source link

请问openai的版本是? #41

Open LiuChen19960902 opened 7 months ago

LiuChen19960902 commented 7 months ago

很赞的工作。但是我在使用中遇到了一些openai的报错。 请问您使用的openai版本是多少呢

{"time": "2024-01-26 11:25:02.948113", "index": 6, "iter": 1, "eval_scores": null, "norm_msg": "None", "err_msg": "Traceback (most recent call last):\n  File \"/root/.pyenv/versions/3.10.0/lib/python3.10/site-packages/ml3m/base/eval.py\", line 378, in process_func\n    scores = self._get_score(data_item, **kwargs)\n  File \"/root/.pyenv/versions/3.10.0/lib/python3.10/site-packages/ml3m/base/eval.py\", line 866, in _get_score\n    completion = openai.ChatCompletion.create(\n  File \"/root/.pyenv/versions/3.10.0/lib/python3.10/site-packages/openai/lib/_old_api.py\", line 39, in __call__\n    raise APIRemovedInV1(symbol=self._symbol)\nopenai.lib._old_api.APIRemovedInV1: \n\nYou 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.\n\nYou can run `openai migrate` to automatically upgrade your codebase to use the 1.0.0 interface. \n\nAlternatively, you can pin your installation to the old version, e.g. `pip install openai==0.28`\n\nA detailed migration guide is available here: https://github.com/openai/openai-python/discussions/742\n\n"}
zhaobinghao commented 4 months ago

很赞的工作。但是我在使用中遇到了一些openai的报错。 请问您使用的openai版本是多少呢

{"time": "2024-01-26 11:25:02.948113", "index": 6, "iter": 1, "eval_scores": null, "norm_msg": "None", "err_msg": "Traceback (most recent call last):\n  File \"/root/.pyenv/versions/3.10.0/lib/python3.10/site-packages/ml3m/base/eval.py\", line 378, in process_func\n    scores = self._get_score(data_item, **kwargs)\n  File \"/root/.pyenv/versions/3.10.0/lib/python3.10/site-packages/ml3m/base/eval.py\", line 866, in _get_score\n    completion = openai.ChatCompletion.create(\n  File \"/root/.pyenv/versions/3.10.0/lib/python3.10/site-packages/openai/lib/_old_api.py\", line 39, in __call__\n    raise APIRemovedInV1(symbol=self._symbol)\nopenai.lib._old_api.APIRemovedInV1: \n\nYou 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.\n\nYou can run `openai migrate` to automatically upgrade your codebase to use the 1.0.0 interface. \n\nAlternatively, you can pin your installation to the old version, e.g. `pip install openai==0.28`\n\nA detailed migration guide is available here: https://github.com/openai/openai-python/discussions/742\n\n"}

我的是1.26.0, 您看看是不是openai.json里面"n_workers"写成了1, 我是因为改成了1出现了和您一样的报错信息, 改成大于1的就可以跑了