我在尝试构建与 OpenAI 集成的语音助手时遇到错误。我面临着这个挑战[关闭]

问题描述 投票:0回答:1

我已经按照视频教程中的说明实现了代码。尽管与 ChatGPT 进行了交叉检查,我仍然遇到错误。您能帮我解决问题吗?

预期的行为是返回或打印 the error image is attached for the reference响应。

python visual-studio-code project openai-api developer-tools
1个回答
0
投票

出现

AttributeError: partially initialized module 'openai' has no attribute 'Completion' (most likely due to a circular import)
是因为您将文件命名为
openai.py

将文件从

openai.py
重命名为其他名称。例如,
test.py

© www.soinside.com 2019 - 2024. All rights reserved.