XiaoXinYo / Chat-WebAPI

一款基于Python-FastAPI框架,开发的多种Chat WebAPI程序.
MIT License
57 stars 15 forks source link

[Bug]: 请问报错这个怎么解决? #6

Open qq263424205 opened 1 year ago

qq263424205 commented 1 year ago

在提交前请确保以下这些

操作系统

Windows

Python版本

python3.10.11

问题

ImportError: cannot import name 'ConversationStyle' from 'EdgeGPT' (D:\python\lib\site-packages\EdgeGPT__init__.py)

触发

python main.py

报错

D:\demo\Chat-API-main>python main.py Traceback (most recent call last): File "D:\demo\Chat-API-main\main.py", line 6, in from view import chatgpt, bing, bard, ernie File "D:\demo\Chat-API-main\view\bing.py", line 8, in from EdgeGPT import ConversationStyle ImportError: cannot import name 'ConversationStyle' from 'EdgeGPT' (D:\python\lib\site-packages\EdgeGPT__init__.py)

请问要怎么解决?

其他

No response

kkkkiven commented 1 year ago

同样的问题,求解

kkkkiven commented 1 year ago

找到了。我把导入的时候from EdgeGPT import ConversationStyle 改成from EdgeGPT.EdgeGPT import ConversationStyle。这样就能用了

XiaoXinYo commented 1 year ago

正在修复。。。

XiaoXinYo commented 1 year ago

已更新