zhayujie / chatgpt-on-wechat

基于大模型搭建的聊天机器人,同时支持 微信公众号、企业微信应用、飞书、钉钉 等接入,可选择GPT3.5/GPT-4o/GPT-o1/ Claude/文心一言/讯飞星火/通义千问/ Gemini/GLM-4/Claude/Kimi/LinkAI,能处理文本、语音和图片,访问操作系统和互联网,支持基于自有知识库进行定制企业智能客服。
https://docs.link-ai.tech/cow
MIT License
29.96k stars 7.9k forks source link

可以把gemini部署在Railway的模板上吗 #1639

Closed limaolin2017 closed 1 month ago

limaolin2017 commented 8 months ago

前置确认

⚠️ 搜索issues中是否已存在类似问题

操作系统类型?

MacOS

运行的python版本是?

python 3.10

使用的chatgpt-on-wechat版本是?

Latest Release

运行的channel类型是?

wxy(个人微信, wechaty)

复现步骤 🕹

railway一键部署

问题描述 😯

在railway中没有安装支持gemini的库

终端日志 📒

Start auto replying.

[INFO][2023-12-31 01:09:34][bridge.py:49] - create bot gemini for chat

[ERROR][2023-12-31 01:09:34][chat_channel.py:299] - Worker return exception: No module named 'google.generativeai'

Traceback (most recent call last):

File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run

result = self.fn(*self.args, **self.kwargs)

File "/app/channel/chat_channel.py", line 168, in _handle

reply = self._generate_reply(context)

File "/app/channel/chat_channel.py", line 189, in _generate_reply

reply = super().build_reply_content(context.content, context)

File "/app/channel/channel.py", line 37, in build_reply_content

return Bridge().fetch_reply_content(query, context)

File "/app/bridge/bridge.py", line 64, in fetch_reply_content

return self.get_bot("chat").reply(query, context)

File "/app/bridge/bridge.py", line 55, in get_bot

self.bots[typename] = create_bot(self.btype[typename])

File "/app/bot/bot_factory.py", line 52, in create_bot

from bot.gemini.google_gemini_bot import GoogleGeminiBot

File "/app/bot/gemini/google_gemini_bot.py", line 10, in <module>

import google.generativeai as genai

ModuleNotFoundError: No module named 'google.generativeai'
zwdzwdzwd commented 8 months ago

同样的错误,在原来openai 的位置填gemini的key 就是这样的结果,求解。

li5bo5 commented 7 months ago

我也想把gemini部署在Railway,该怎么操作啊

6vision commented 1 month ago

railway不再免费部署,后续应不再维护了,建议服务器直接部署