zhayujie / chatgpt-on-wechat

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

Dokcer部署的,在哪个目录配置godcmd的config.json #2095

Closed willzzq closed 1 week ago

willzzq commented 1 week ago

Dokcer部署的,在哪个目录配置godcmd的config.json?

我复制一个docker-compose.yml文件到一个新目录,使用指令 docker compose up -d 启动后,发现向godcmd的config.json是新件的,里面的口令还是为空。原始文件在哪里设置?谢谢

willzzq commented 1 week ago

哦,晓得了,通过DockerComposer管理器找到改容器目录。不过复制相同容器每次都要重新设置和安装插件

huangzhitian commented 1 week ago

哦,晓得了,通过DockerComposer管理器找到改容器目录。不过复制相同容器每次都要重新设置和安装插件

image 给个建议,这样你随便更新版本随便删除重装容器,安装过的插件和一些插件用到的模块都还在,数据也保留,全映射到本地,另外在微信使用#installp xxxx 安装插件,插件也是安装在这里而不是docker容器

willzzq commented 1 week ago

哦,晓得了,通过DockerComposer管理器找到改容器目录。不过复制相同容器每次都要重新设置和安装插件

image 给个建议,这样你随便更新版本随便删除重装容器,安装过的插件和一些插件用到的模块都还在,数据也保留,全映射到本地,另外在微信使用#installp xxxx 安装插件,插件也是安装在这里而不是docker容器

太感谢了,我试试看。正为此烦恼呢!

willzzq commented 1 week ago

太感谢了,我试试看。正为此烦恼呢!

willzzq commented 1 week ago

试了一下,有点问题。我把容器中的app目录复制过来,放到项目目录中 - .app/plugins:/app/plugins 。这样就可以了 设置下面的目录,会报错:

willzzq commented 1 week ago

试了一下,有点问题。我把容器中的app目录复制过来,放到项目目录中 - .app/plugins:/app/plugins 。这样就可以了 设置下面的目录,会报错:

huangzhitian commented 1 week ago

试了一下,有点问题。我把容器中的app目录复制过来,放到项目目录中 - .app/plugins:/app/plugins 。这样就可以了 设置下面的目录,会报错: - ./mod/lib/python3.10/site-packages:/usr/local/lib/python3.10/site-packages - ./config.json:/app/config.json 不知道config.json 是配置哪些参数?配置项目参数还是插件参数? 我配置插件参数比如tool的,不行。 在docker-compose.yml文件当前目录运行命令python3 -m venv mod,创建一个名叫mod的虚拟环境目录然后映射,-./mod/lib/python3.10/site-packages:/usr/local/lib/python3.10/site-packages,把容器里的/usr/local/lib/python3.10/site-packages这个依赖文件夹复制替换到/mod/lib/python3.10/site-packages,大概300m,之后插件如果需要安装依赖,cd到plugins/xxx插件目录,启用虚拟环境命令 source mod/bin/activate ,安装依赖pip3 install -r requirements.txt,依赖会保存在mod目录而不是docker容器,之后deactivate 命令退出虚拟环境。另外- ./config.json:/app/config.json是映射项目的主配置,插件配置前往插件目录填下就行了。还不懂加我335180517我帮你远程

willzzq commented 1 week ago

太感谢,我试试看。

willzzq commented 1 week ago

我将Python 3.6.8升级到3.10.14,然后按照你这个操作,现在报错: (mod) [root@VM_0_14_centos timetask]# source ../../../mod/bin/activate (mod) [root@VM_0_14_centos timetask]# pip3 install -r requirements.txt WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. Looking in indexes: https://mirrors.tencent.com/pypi/simple WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /pypi/simple/arrow/ WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /pypi/simple/arrow/ WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /pypi/simple/arrow/ WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /pypi/simple/arrow/ WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /pypi/simple/arrow/ Could not fetch URL https://mirrors.tencent.com/pypi/simple/arrow/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='mirrors.tencent.com', port=443): Max retries exceeded with url: /pypi/simple/arrow/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping ERROR: Could not find a version that satisfies the requirement arrow>=1.2.3 (from versions: none) ERROR: No matching distribution found for arrow>=1.2.3 WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. Could not fetch URL https://mirrors.tencent.com/pypi/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='mirrors.tencent.com', port=443): Max retries exceeded with url: /pypi/simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping

暂时先不弄了。 这个config.json 里可以加群名重启容器生效,/plugins/config.json 可设置参数,已经解决了大问题了,让我加群名不要重建容器了。非常感谢!

willzzq commented 1 week ago

明白了:配置参数不要放在环境变量里。这样就可以实时重新加载了。感谢!

6vision commented 1 week ago

可以挂载一个config.json来配置插件, 参考docker部署

也可以参考这个docker部署cow教程中的插件修改