Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

新增插件: replicate (4月9日支持处理图片,如照片修复等模型) #770

Open
lanvent opened this issue Apr 7, 2023 · 79 comments
Labels
documentation Improvements or additions to documentation

Comments

@lanvent
Copy link
Collaborator

lanvent commented Apr 7, 2023

使用Replicate API画图的插件,插件说明

image

v0.1初始版本,要求: chatgpt-on-wechat>=1.2.1.1

插件安装参考更新记录,以下3个方法都可以安装插件:

  1. 管理员认证后,#installp https://github.com/lanvent/plugin_replicate.git

  2. pull最新代码,管理员认证后, #installp replicate

  3. 手动复制插件里的所有文件,放置在plugins目录下的子文件夹中,除此以外,你还需要安装文件夹中requirements.txt中的依赖

注意事项:

  • API调用速度有可能很慢,会阻塞单个会话,可参考更新记录调整单个会话的最大并发数量。

Update:

使用"#updatep replicate"指令,可更新插件到最新版。 也可重新安装插件。

v0.3 支持翻译中文Prompt

需要参考

"baidu_translate_app_id": "", # 百度翻译api的appid
"baidu_translate_app_key": "", # 百度翻译api的秘钥
添加百度翻译API key和秘钥到config.json中。

v0.2 支持输入图片

要求: chatgpt-on-wechat>=1.2.2

以图片修复为例:

image

image

image

@lanvent lanvent added the documentation Improvements or additions to documentation label Apr 7, 2023
@zhayujie
Copy link
Owner

zhayujie commented Apr 7, 2023

发福利了

@zhayujie zhayujie pinned this issue Apr 7, 2023
@qcoltma
Copy link

qcoltma commented Apr 7, 2023

installp这个命令是在哪里的?运行不了呀

@lanvent
Copy link
Collaborator Author

lanvent commented Apr 7, 2023

installp这个命令是在哪里的?运行不了呀

再点击下更新记录看看,刚才忘记改链接了。

@congxuma
Copy link

congxuma commented Apr 7, 2023

可以使用,厉害的

但是有个问题,开启插件后画图没有按规定的格式输入会识别不了但是,不是走的OPENAI原本的画图接口,而是继续调用replicate插件只是prompt是空; 我预期的是没识别就走原本的接口
image
image

@lanvent
Copy link
Collaborator Author

lanvent commented Apr 7, 2023

之前为了节省余额就让sdwebui插件全程接管画画指令了,欢迎去插件所在仓库提交 增加失败逻辑选项 的PR~

@qcoltma
Copy link

qcoltma commented Apr 8, 2023

installp这个命令是在哪里的?运行不了呀

再点击下更新记录看看,刚才忘记改链接了。

可以了,感觉画来画去都是这幅图,可能是我不怎么会用。
画竖版 高清 二次元:白发,眼镜

fa6447f7c22902b770354298593f61a

@hy546880109
Copy link

railyway一键部署的如何使用replicate插件

@lichengzhe
Copy link
Contributor

插件拉到本地 add到项目里 改配置 删docker 加key参数就行了

@lanvent lanvent changed the title 新增插件: replicate 新增插件: replicate (4月9日支持输入图片,调用照片修复) Apr 8, 2023
@lanvent lanvent changed the title 新增插件: replicate (4月9日支持输入图片,调用照片修复) 新增插件: replicate (4月9日支持处理图片,如照片修复等模型) Apr 8, 2023
@qcoltma
Copy link

qcoltma commented Apr 9, 2023

#updatep replicate
更新插件成功,运行出错,微信端没有任何反应:

[INFO][2023-04-09 09:34:04][bridge.py:28] - create bot chatGPT for chat
[ERROR][2023-04-09 09:34:04][chat_channel.py:235] - Worker return exception: IMAGE
Traceback (most recent call last):
File "/usr/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File "/home/qcolt/chatgpt-on-wechat/channel/chat_channel.py", line 128, in _handle
reply = self._generate_reply(context)
File "/home/qcolt/chatgpt-on-wechat/channel/chat_channel.py", line 138, in _generate_reply
e_context = PluginManager().emit_event(EventContext(Event.ON_HANDLE_CONTEXT, {
File "/home/qcolt/chatgpt-on-wechat/plugins/plugin_manager.py", line 159, in emit_event
instance.handlers[e_context.event](e_context, *args, **kwargs)
File "/home/qcolt/chatgpt-on-wechat/plugins/plugin_replicate/main.py", line 50, in on_handle_context
if e_context['context'].type not in [ContextType.IMAGE_CREATE, ContextType.IMAGE]:
File "/usr/lib/python3.8/enum.py", line 384, in getattr
raise AttributeError(name) from None
AttributeError: IMAGE

@lanvent
Copy link
Collaborator Author

lanvent commented Apr 9, 2023

chatgpt-on-wechat需要更新到最新

@hecarli555
Copy link

使用这个插件需要注册sb或者mj账号么???还是说只用openai的key就可以了

@xiabill
Copy link

xiabill commented Apr 10, 2023

画修复 这个开启需要怎么设置吗?

@lanvent
Copy link
Collaborator Author

lanvent commented Apr 10, 2023

画修复 这个开启需要怎么设置吗?

这个关键词默认已经加在插件文件夹的config.json.template里了

@LiberBinjio
Copy link

怎么才能不使用DALL-E2呢,安装了replicate 插件但还是一直调用的DALL-E2画图。求教

@lanvent
Copy link
Collaborator Author

lanvent commented Apr 13, 2023

#plist 可以查看插件是否开启成功

@LiberBinjio
Copy link

输入#installp replicate后回复
[INFO]
安装插件成功,请使用 #scanp 命令扫描插件或重启程序,开启前请检查插件是否需要配置
但输入#scanp后回复
[INFO]
插件扫描完成, 未发现新插件

@LiberBinjio
Copy link

#plist 可以查看插件是否开启成功

请问怎么查看插件是否开启成功呢

@lanvent
Copy link
Collaborator Author

lanvent commented Apr 13, 2023

#plist 可以查看插件是否开启成功

@LiberBinjio
Copy link

#plist 可以查看插件是否开启成功

好的,我理解了
回复是
[INFO]
插件列表:
Godcmd_v1.0 999 - 已启用
Banwords_v1.0 100 - 已启用
Role_v1.0 0 - 已启用
Dungeon_v1.0 0 - 已启用
BDunit_v0.1 0 - 未启用
Hello_v0.1 -1 - 已启用
Finish_v1.0 -999 - 已启用
没看到replicate
我想要#enablep replicate 也回复插件不存在
这是为什么呢?

@dqzboy
Copy link

dqzboy commented Apr 14, 2023

#plist 可以查看插件是否开启成功

大佬,我执行提示 需要管理员权限才能执行该指令,管理员在哪里配置?

@LiberBinjio
Copy link

#plist 可以查看插件是否开启成功

大佬,我执行提示 需要管理员权限才能执行该指令,管理员在哪里配置?

在plugins/godcmd/config.json下设置password密码
然后输入#auth + 密码

@dqzboy
Copy link

dqzboy commented Apr 14, 2023

#plist 可以查看插件是否开启成功

大佬,我执行提示 需要管理员权限才能执行该指令,管理员在哪里配置?

在plugins/godcmd/config.json下设置password密码 然后输入#auth + 密码

好的 谢谢大佬

@lanvent
Copy link
Collaborator Author

lanvent commented May 10, 2023

还需要加一句插件的配置
https://github.com/lanvent/plugin_replicate/blob/f96af455ecc4081eaf00f6c25c8e105ad9246a83/config.json.template#L3

@NeoGoal
Copy link

NeoGoal commented May 15, 2023

请教下大佬,我这里也是启用失败,可是我已经配置了环境变量了,是没有生效吗?环境:railway。

image
image

这个要如何处理,非常感谢。

@lanvent
Copy link
Collaborator Author

lanvent commented May 15, 2023

restart了吗

@NeoGoal
Copy link

NeoGoal commented May 16, 2023

restart了吗

Restar了,还是一样的错误呢

@NeoGoal
Copy link

NeoGoal commented May 16, 2023

restart了吗

Restar了,还是一样的错误呢

刚才重新安装了下,可以了,谢谢大佬!

@GesiIvy128
Copy link

GesiIvy128 commented May 16, 2023

railway应该怎么加这个插件呢?我加了replicate token到VARIABLES里,结果并不工作……
#------------#
Ok 不知道咋回事我重新部署就生效了,但我该如何修改replicate用到的模型呢?(railway部署时)

@lanvent
Copy link
Collaborator Author

lanvent commented May 17, 2023

如果要在railway上修改插件的config,需要删除根目录下的dockerfile,将replicate插件文件夹上传到自己的仓库里plugins文件夹,并把文件夹中requirements.txt的内容复制到根目录下的同名文件中。

@GesiIvy128
Copy link

多谢解惑,我再琢磨琢磨
Great work!

@sx565355044
Copy link

我直接#installp replicate 安装成功后,在配置里添加了API,但是#plist看不到插件,#updatep replicate 也显示插件不存在,这是为什么呢?

@lanvent
Copy link
Collaborator Author

lanvent commented May 23, 2023

看一看日志有没有报错吧,这个安装提示信息不是百分百靠谱

@sx565355044
Copy link

[INFO][2023-05-23 03:09:44][wechatcomapp_channel.py:147] - [wechatcom] receive params: <Storage {'msg_signature': '9638f5c6bd48418ee1067dc998695790614578b1', 'nonce': '1684070958', 'timestamp': '1684825783'}>
113.108.92.100:58402 - - [23/May/2023 03:09:44] "HTTP/1.1 POST /wxcomapp" - 200 OK
[INFO][2023-05-23 03:09:45][wechatcomapp_channel.py:63] - [wechatcom] Do send text to PengShiXian: [ERROR]
显示的是这个

@lanvent
Copy link
Collaborator Author

lanvent commented May 23, 2023

需要#installp replicate 这一段时间的日志

@sx565355044
Copy link

#installp replicate

弄好了,是python版本问题

@CHENEY-LANCE
Copy link

感觉画来画去都是那几个妹子,有什么方法改变下吗

@lanvent
Copy link
Collaborator Author

lanvent commented May 31, 2023

参考使用说明 来改变使用的模型

@skyrim-X
Copy link

skyrim-X commented Jun 8, 2023

我猜可以使用这样的方式:你把replicate的优先级调高,把config文件中的default参数中的model跟version删掉,这样处理,如果没匹配到replicate的关键词会生图失败,继续交付给sdwebui

请问一下如何调整优先级?
还有一个就是我遇到了 requests.exceptions.MissingSchema: Invalid URL '<generator object Prediction.output_iterator at 0x0000020310188EB0>': No scheme supplied. Perhaps you meant https://<generator object Prediction.output_iterator at 0x0000020310188EB0>? 这个问题,不太懂为啥

@Abyss-Seeker
Copy link
Contributor

请教一下大佬,这边同样是启动失败。使用第一种方法installp下载的,log显示成功下载,文件也有(在plugin_replicate文件夹下)。config了replicate以后没动过,#scanp 返回了 [INFO] 插件扫描完成, 未发现新插件,
#plist 返回 [INFO] 插件列表: Godcmd_v1.0 999 - 已启用 Keyword_v0.1 900 - 已启用 Banwords_v1.0 100 - 未启用 tool_v0.4 0 - 已启用 Role_v1.0 0 - 已启用 Dungeon_v1.0 0 - 已启用 BDunit_v0.1 0 - 未启用 Hello_v0.1 -1 - 已启用 Finish_v1.0 -999 - 已启用
#enablep 返回插件不存在。,重装了一次也没用,python版本3.9
之后运行启动app.py的时候发现log报错
image
求解,谢谢!

@lanvent
Copy link
Collaborator Author

lanvent commented Jun 10, 2023

pip show urllib3 检查下urllib3的版本是不是>=1.26.0

@Abyss-Seeker
Copy link
Contributor

我刚把它重装了1.26.9版本,但这下报错进不去了..


Traceback (most recent call last):
  File "D:\ProgramData\Anaconda3\lib\site-packages\urllib3\connectionpool.py", line 696, in urlopen
    self._prepare_proxy(conn)
  File "D:\ProgramData\Anaconda3\lib\site-packages\urllib3\connectionpool.py", line 964, in _prepare_proxy
    conn.connect()
  File "D:\ProgramData\Anaconda3\lib\site-packages\urllib3\connection.py", line 358, in connect
    conn = self._connect_tls_proxy(hostname, conn)
  File "D:\ProgramData\Anaconda3\lib\site-packages\urllib3\connection.py", line 495, in _connect_tls_proxy
    return ssl_wrap_socket(
  File "D:\ProgramData\Anaconda3\lib\site-packages\urllib3\util\ssl_.py", line 424, in ssl_wrap_socket
    ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls)
  File "D:\ProgramData\Anaconda3\lib\site-packages\urllib3\util\ssl_.py", line 466, in _ssl_wrap_socket_impl
    return ssl_context.wrap_socket(sock)
  File "D:\ProgramData\Anaconda3\lib\ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
  File "D:\ProgramData\Anaconda3\lib\ssl.py", line 1040, in _create
    self.do_handshake()
  File "D:\ProgramData\Anaconda3\lib\ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:1129)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Jasper\AppData\Roaming\Python\Python39\site-packages\requests\adapters.py", line 489, in send
    resp = conn.urlopen(
  File "D:\ProgramData\Anaconda3\lib\site-packages\urllib3\connectionpool.py", line 755, in urlopen
    retries = retries.increment(
  File "D:\ProgramData\Anaconda3\lib\site-packages\urllib3\util\retry.py", line 573, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='login.weixin.qq.com', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1129)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:\Codes\chatgpt-on-wechat\lib\itchat\utils.py", line 134, in test_connect
    r = requests.get(config.BASE_URL)
  File "C:\Users\Jasper\AppData\Roaming\Python\Python39\site-packages\requests\api.py", line 73, in get
    return request("get", url, params=params, **kwargs)
  File "C:\Users\Jasper\AppData\Roaming\Python\Python39\site-packages\requests\api.py", line 59, in request
    return session.request(method=method, url=url, **kwargs)
  File "C:\Users\Jasper\AppData\Roaming\Python\Python39\site-packages\requests\sessions.py", line 587, in request
    resp = self.send(prep, **send_kwargs)
  File "C:\Users\Jasper\AppData\Roaming\Python\Python39\site-packages\requests\sessions.py", line 701, in send
    r = adapter.send(request, **kwargs)
  File "C:\Users\Jasper\AppData\Roaming\Python\Python39\site-packages\requests\adapters.py", line 563, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='login.weixin.qq.com', port=443): Max retries exceeded with url: / (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1129)')))

You can't get access to internet or wechat domain, so exit.

之前遇到这个问题看了一个这边的issues,把urllib版本降到1.25才能进去,不然似乎开了proxy就会报错.. 如果先不开proxy扫码登陆了以后开proxy则也会报错

@zakka5
Copy link

zakka5 commented Jul 22, 2023

安装本插件是报错
安装插件失败,module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'), receiver=@3f3f66ee7fee3b83c68c46c8a4df88fc0256dafb4ea2ce681cc9fe799ed15e
我更新了openssl的库还是不行

@zakka5
Copy link

zakka5 commented Jul 22, 2023

安装本插件是报错
安装插件失败
pip install -r requirements.txt
Traceback (most recent call last):
File "/usr/bin/pip", line 11, in
load_entry_point('pip==20.0.2', 'console_scripts', 'pip')()
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 490, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2854, in load_entry_point
return ep.load()
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2445, in load
return self.resolve()
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2451, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "/usr/lib/python3/dist-packages/pip/_internal/cli/main.py", line 10, in
from pip._internal.cli.autocompletion import autocomplete
File "/usr/lib/python3/dist-packages/pip/_internal/cli/autocompletion.py", line 9, in
from pip._internal.cli.main_parser import create_main_parser
File "/usr/lib/python3/dist-packages/pip/_internal/cli/main_parser.py", line 7, in
from pip._internal.cli import cmdoptions
File "/usr/lib/python3/dist-packages/pip/_internal/cli/cmdoptions.py", line 24, in
from pip._internal.exceptions import CommandError
File "/usr/lib/python3/dist-packages/pip/_internal/exceptions.py", line 10, in
from pip._vendor.six import iteritems
File "/usr/lib/python3/dist-packages/pip/_vendor/init.py", line 65, in
vendored("cachecontrol")
File "/usr/lib/python3/dist-packages/pip/_vendor/init.py", line 36, in vendored
import(modulename, globals(), locals(), level=0)
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 655, in _load_unlocked
File "", line 618, in _load_backward_compatible
File "", line 259, in load_module
File "/usr/share/python-wheels/CacheControl-0.12.6-py2.py3-none-any.whl/cachecontrol/init.py", line 9, in
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 655, in _load_unlocked
File "", line 618, in _load_backward_compatible
File "", line 259, in load_module
File "/usr/share/python-wheels/CacheControl-0.12.6-py2.py3-none-any.whl/cachecontrol/wrapper.py", line 1, in
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 655, in _load_unlocked
File "", line 618, in _load_backward_compatible
File "", line 259, in load_module
File "/usr/share/python-wheels/CacheControl-0.12.6-py2.py3-none-any.whl/cachecontrol/adapter.py", line 5, in
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 655, in _load_unlocked
File "", line 618, in _load_backward_compatible
File "", line 259, in load_module
File "/usr/share/python-wheels/requests-2.22.0-py2.py3-none-any.whl/requests/init.py", line 95, in
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 655, in _load_unlocked
File "", line 618, in _load_backward_compatible
File "", line 259, in load_module
File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/contrib/pyopenssl.py", line 46, in
File "/usr/lib/python3/dist-packages/OpenSSL/init.py", line 8, in
from OpenSSL import crypto, SSL
File "/usr/lib/python3/dist-packages/OpenSSL/crypto.py", line 1553, in
class X509StoreFlags(object):
File "/usr/lib/python3/dist-packages/OpenSSL/crypto.py", line 1573, in X509StoreFlags
CB_ISSUER_CHECK = _lib.X509_V_FLAG_CB_ISSUER_CHECK
AttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 72, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/init.py", line 5, in
from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 32, in
import apport.fileutils
File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 12, in
import os, glob, subprocess, os.path, time, pwd, sys, requests_unixsocket
File "/usr/lib/python3/dist-packages/requests_unixsocket/init.py", line 1, in
import requests
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 655, in _load_unlocked
File "", line 618, in _load_backward_compatible
File "", line 259, in load_module
File "/usr/share/python-wheels/requests-2.22.0-py2.py3-none-any.whl/requests/init.py", line 95, in
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 655, in _load_unlocked
File "", line 618, in _load_backward_compatible
File "", line 259, in load_module
File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/contrib/pyopenssl.py", line 46, in
File "/usr/lib/python3/dist-packages/OpenSSL/init.py", line 8, in
from OpenSSL import crypto, SSL
File "/usr/lib/python3/dist-packages/OpenSSL/crypto.py", line 1553, in
class X509StoreFlags(object):
File "/usr/lib/python3/dist-packages/OpenSSL/crypto.py", line 1573, in X509StoreFlags
CB_ISSUER_CHECK = _lib.X509_V_FLAG_CB_ISSUER_CHECK
AttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'

Original exception was:
Traceback (most recent call last):
File "/usr/bin/pip", line 11, in
load_entry_point('pip==20.0.2', 'console_scripts', 'pip')()
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 490, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2854, in load_entry_point
return ep.load()
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2445, in load
return self.resolve()
File "/usr/lib/python3/dist-packages/pkg_resources/init.py", line 2451, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "/usr/lib/python3/dist-packages/pip/_internal/cli/main.py", line 10, in
from pip._internal.cli.autocompletion import autocomplete
File "/usr/lib/python3/dist-packages/pip/_internal/cli/autocompletion.py", line 9, in
from pip._internal.cli.main_parser import create_main_parser
File "/usr/lib/python3/dist-packages/pip/_internal/cli/main_parser.py", line 7, in
from pip._internal.cli import cmdoptions
File "/usr/lib/python3/dist-packages/pip/_internal/cli/cmdoptions.py", line 24, in
from pip._internal.exceptions import CommandError
File "/usr/lib/python3/dist-packages/pip/_internal/exceptions.py", line 10, in
from pip._vendor.six import iteritems
File "/usr/lib/python3/dist-packages/pip/_vendor/init.py", line 65, in
vendored("cachecontrol")
File "/usr/lib/python3/dist-packages/pip/_vendor/init.py", line 36, in vendored
import(modulename, globals(), locals(), level=0)
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 655, in _load_unlocked
File "", line 618, in _load_backward_compatible
File "", line 259, in load_module
File "/usr/share/python-wheels/CacheControl-0.12.6-py2.py3-none-any.whl/cachecontrol/init.py", line 9, in
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 655, in _load_unlocked
File "", line 618, in _load_backward_compatible
File "", line 259, in load_module
File "/usr/share/python-wheels/CacheControl-0.12.6-py2.py3-none-any.whl/cachecontrol/wrapper.py", line 1, in
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 655, in _load_unlocked
File "", line 618, in _load_backward_compatible
File "", line 259, in load_module
File "/usr/share/python-wheels/CacheControl-0.12.6-py2.py3-none-any.whl/cachecontrol/adapter.py", line 5, in
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 655, in _load_unlocked
File "", line 618, in _load_backward_compatible
File "", line 259, in load_module
File "/usr/share/python-wheels/requests-2.22.0-py2.py3-none-any.whl/requests/init.py", line 95, in
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 655, in _load_unlocked
File "", line 618, in _load_backward_compatible
File "", line 259, in load_module
File "/usr/share/python-wheels/urllib3-1.25.8-py2.py3-none-any.whl/urllib3/contrib/pyopenssl.py", line 46, in
File "/usr/lib/python3/dist-packages/OpenSSL/init.py", line 8, in
from OpenSSL import crypto, SSL
File "/usr/lib/python3/dist-packages/OpenSSL/crypto.py", line 1553, in
class X509StoreFlags(object):
File "/usr/lib/python3/dist-packages/OpenSSL/crypto.py", line 1573, in X509StoreFlags
CB_ISSUER_CHECK = _lib.X509_V_FLAG_CB_ISSUER_CHECK
AttributeError: module 'lib' has no attribute 'X509_V_FLAG_CB_ISSUER_CHECK'

@befantasy
Copy link
Contributor

使用docker部署,#installp命令安装,安装后又pip安装了requirements,没有任何报错。但是#scanp的时候有以下报错。

[INFO][2023-07-22 21:51:04][wechat_channel.py:190] - [WX] sendMsg=Reply(type=INFO, content=[INFO]
chatgpt-on-wechat | 安装插件成功,请使用 #scanp 命令扫描插件或重启程序,开启前请检查插件是否需要配置), receiver=@719432690bdeb6f61e9bb6e50fb91e53
chatgpt-on-wechat | [INFO][2023-07-22 21:55:28][plugin_manager.py:66] - Scaning plugins ...
chatgpt-on-wechat | [ERROR][2023-07-22 21:55:28][plugin_manager.py:91] - Failed to import plugin plugin_replicate:
chatgpt-on-wechat |
chatgpt-on-wechat | IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
chatgpt-on-wechat |
chatgpt-on-wechat | Importing the numpy C-extensions failed. This error can happen for
chatgpt-on-wechat | many reasons, often due to issues with your setup or how NumPy was
chatgpt-on-wechat | installed.
chatgpt-on-wechat |
chatgpt-on-wechat | We have compiled some common reasons and troubleshooting tips at:
chatgpt-on-wechat |
chatgpt-on-wechat | https://numpy.org/devdocs/user/troubleshooting-importerror.html
chatgpt-on-wechat |
chatgpt-on-wechat | Please note and check the following:
chatgpt-on-wechat |
chatgpt-on-wechat | * The Python version is: Python3.10 from "/usr/local/bin/python"
chatgpt-on-wechat | * The NumPy version is: "1.24.2"
chatgpt-on-wechat |
chatgpt-on-wechat | and make sure that they are the versions you expect.
chatgpt-on-wechat | Please carefully study the documentation linked above for further help.
chatgpt-on-wechat |
chatgpt-on-wechat | Original error was: libgfortran-040039e1.so.5.0.0: failed to map segment from shared object
chatgpt-on-wechat | Traceback (most recent call last):
chatgpt-on-wechat | File "/usr/local/lib/python3.10/site-packages/numpy/core/init.py", line 23, in
chatgpt-on-wechat | from . import multiarray
chatgpt-on-wechat | File "/usr/local/lib/python3.10/site-packages/numpy/core/multiarray.py", line 10, in
chatgpt-on-wechat | from . import overrides
chatgpt-on-wechat | File "/usr/local/lib/python3.10/site-packages/numpy/core/overrides.py", line 6, in
chatgpt-on-wechat | from numpy.core._multiarray_umath import (
chatgpt-on-wechat | ImportError: libgfortran-040039e1.so.5.0.0: failed to map segment from shared object
chatgpt-on-wechat |
chatgpt-on-wechat | During handling of the above exception, another exception occurred:
chatgpt-on-wechat |
chatgpt-on-wechat | Traceback (most recent call last):
chatgpt-on-wechat | File "/app/plugins/plugin_manager.py", line 88, in scan_plugins
chatgpt-on-wechat | self.loaded[plugin_path] = importlib.import_module(import_path)
chatgpt-on-wechat | File "/usr/local/lib/python3.10/importlib/init.py", line 126, in import_module
chatgpt-on-wechat | return _bootstrap._gcd_import(name[level:], package, level)
chatgpt-on-wechat | File "", line 1050, in _gcd_import
chatgpt-on-wechat | File "", line 1027, in _find_and_load
chatgpt-on-wechat | File "", line 1006, in _find_and_load_unlocked
chatgpt-on-wechat | File "", line 688, in _load_unlocked
chatgpt-on-wechat | File "", line 883, in exec_module
chatgpt-on-wechat | File "", line 241, in _call_with_frames_removed
chatgpt-on-wechat | File "/app/plugins/plugin_replicate/init.py", line 1, in
chatgpt-on-wechat | from .main import *
chatgpt-on-wechat | File "/app/plugins/plugin_replicate/main.py", line 4, in
chatgpt-on-wechat | import langid
chatgpt-on-wechat | File "/usr/local/lib/python3.10/site-packages/langid/init.py", line 1, in
chatgpt-on-wechat | from .langid import classify, rank, set_languages
chatgpt-on-wechat | File "/usr/local/lib/python3.10/site-packages/langid/langid.py", line 57, in
chatgpt-on-wechat | import numpy as np
chatgpt-on-wechat | File "/usr/local/lib/python3.10/site-packages/numpy/init.py", line 141, in
chatgpt-on-wechat | from . import core
chatgpt-on-wechat | File "/usr/local/lib/python3.10/site-packages/numpy/core/init.py", line 49, in
chatgpt-on-wechat | raise ImportError(msg)
chatgpt-on-wechat | ImportError:
chatgpt-on-wechat |
chatgpt-on-wechat | IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
chatgpt-on-wechat |
chatgpt-on-wechat | Importing the numpy C-extensions failed. This error can happen for
chatgpt-on-wechat | many reasons, often due to issues with your setup or how NumPy was
chatgpt-on-wechat | installed.
chatgpt-on-wechat |
chatgpt-on-wechat | We have compiled some common reasons and troubleshooting tips at:
chatgpt-on-wechat |
chatgpt-on-wechat | https://numpy.org/devdocs/user/troubleshooting-importerror.html
chatgpt-on-wechat |
chatgpt-on-wechat | Please note and check the following:
chatgpt-on-wechat |
chatgpt-on-wechat | * The Python version is: Python3.10 from "/usr/local/bin/python"
chatgpt-on-wechat | * The NumPy version is: "1.24.2"
chatgpt-on-wechat |
chatgpt-on-wechat | and make sure that they are the versions you expect.
chatgpt-on-wechat | Please carefully study the documentation linked above for further help.
chatgpt-on-wechat |
chatgpt-on-wechat | Original error was: libgfortran-040039e1.so.5.0.0: failed to map segment from shared object
chatgpt-on-wechat |
chatgpt-on-wechat | [INFO][2023-07-22 21:55:29][wechat_channel.py:190] - [WX] sendMsg=Reply(type=INFO, content=[INFO]
chatgpt-on-wechat | 插件扫描完成, 未发现新插件), receiver=@719432690bdeb6f61e9bb6e50fb91e53

@KunBoy5240
Copy link

图片生了,可是微信没有反应,一直说是需要回复任意字来获取
image

@KunBoy5240
Copy link

图片生了,可是微信没有反应,一直说是需要回复任意字来获取 image

之后次数多了就会报这个错误
image

@JackieHeCc
Copy link

因为很早就安装了项目但是不是最新的导致在聊天机器人界面replicate插件一直安装不上,先在聊天机器人里运行了#installp replicate,提示已安装,即便目录里面有对应的插件数据了,但是#plist一直没有replicate插件,看了半天文档,成功安装并使用了,大概需要以下几点:

  1. 需要将chatgpt-on-wechat项目update到最新版本,cd回车到根目录,pip3 install update (好像是这个。。。纯小白);
  2. 安装replicate必要的requirements.txt;
  3. replicate注册账号并获取api;
  4. 将chatgpt-on-wechat/plugins/plugin_replicate目录下config.json.template复制一份并命名为config.json,cp config.json.template config.json;
  5. 打开config.json并将replicate api填入"replicate_api_token": "You api token",保存退出;
  6. 回到微信对话输入#enablep replicate,这时收到“[INFO] 插件已开启”表示成功。

尝试让它画了一下,结果出人意料,但又在意料之中!?
微信截图_20230920145738

笑死我了。。。

@laobanbiefangcu
Copy link

replicate跟linkai的midjourney冲突了怎么办?画图都是优先使用midjourney

@sssdgithub
Copy link

image
不能达到期望值,怎么解决,那位大佬能否指导指导?

@qwq-10086
Copy link

image
这个该怎么处理

@zzl-myh
Copy link

zzl-myh commented Mar 11, 2024

怎么感觉就是那几个图啊

@you-know-m
Copy link

他好像只是把我的话转述给replicate,但是就没有下文了,这是啥情况。
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests