zhayujie / bot-on-anything

Connect AI models (like ChatGPT-3.5/4.0, Baidu Yiyan, New Bing, Bard) to apps (like Wechat, public account, DingTalk, Telegram, QQ). 将 ChatGPT、必应、文心一言、谷歌Bard 等对话模型连接各类应用,如微信、公众号、QQ、Telegram、Gmail、Slack、Web、企业微信、飞书、钉钉等。
MIT License
3.92k stars 915 forks source link

接http报错了说找不到openai,确实已经安装过,请大神们指导。 #165

Open fattank opened 1 year ago

fattank commented 1 year ago

[2023-03-19 03:06:16,829] ERROR in app: Exception on /chat [POST]
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 2528, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1825, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1823, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.8/dist-packages/flask/app.py", line 1799, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/home/tank/Downloads/bot-on-anything-master/channel/http/http_channel.py", line 28, in chat
reply_text = HttpChannel().handle(data=data)
File "/home/tank/Downloads/bot-on-anything-master/channel/http/http_channel.py", line 65, in handle
return super().build_reply_content(data["msg"], context)
File "/home/tank/Downloads/bot-on-anything-master/channel/channel.py", line 31, in build_reply_content
return Bridge().fetch_reply_content(query, context)
File "/home/tank/Downloads/bot-on-anything-master/bridge/bridge.py", line 9, in fetch_reply_content
return model_factory.create_bot(config.conf().get("model").get("type")).reply(query, context)
File "/home/tank/Downloads/bot-on-anything-master/model/model_factory.py", line 21, in create_bot
from model.chatgpt.chatgpt_model import ChatGPTModel
File "/home/tank/Downloads/bot-on-anything-master/model/chatgpt/chatgpt_model.py", line 7, in
import openai
ModuleNotFoundError: No module named 'openai'
104.149.161.93 - - [19/Mar/2023 03:06:16] "POST /chat HTTP/1.1" 500 -

fattank commented 1 year ago

重新安装 已经搞定。

0Zian commented 1 year ago

我这个模块卸载了,然后重新安装还是不可以,是什么原因 User: nihao Bot: [ERROR][2023-04-23 16:03:39][log.py:47] - [MultiChannel] Start up failed on terminal: No module named 'openai' [ERROR][2023-04-23 16:03:39][log.py:45] - App startup failed! [ERROR][2023-04-23 16:03:39][log.py:50] - No module named 'openai' Traceback (most recent call last): File "app.py", line 42, in main start_process(channel_type[0], args.config) File "app.py", line 23, in start_process raise e File "app.py", line 20, in start_process channel.startup() File "/root/chatgpt/bot-on-anything/channel/terminal/terminal_channel.py", line 21, in startup for res in super().build_reply_content(prompt, context): File "/root/chatgpt/bot-on-anything/channel/channel.py", line 31, in build_reply_content return Bridge().fetch_reply_content(query, context) File "/root/chatgpt/bot-on-anything/bridge/bridge.py", line 18, in fetch_reply_content return model_factory.create_bot(type).reply(query, context) File "/root/chatgpt/bot-on-anything/model/model_factory.py", line 21, in create_bot from model.openai.chatgpt_model import ChatGPTModel File "/root/chatgpt/bot-on-anything/model/openai/chatgpt_model.py", line 7, in import openai ModuleNotFoundError: No module named 'openai'