@@ -4,8 +4,9 @@ | |||||
2. python 已安装:版本在 3.7 ~ 3.10 之间 | 2. python 已安装:版本在 3.7 ~ 3.10 之间 | ||||
3. `git pull` 拉取最新代码 | 3. `git pull` 拉取最新代码 | ||||
4. 执行`pip3 install -r requirements.txt`,检查依赖是否满足 | 4. 执行`pip3 install -r requirements.txt`,检查依赖是否满足 | ||||
5. 在已有 issue 中未搜索到类似问题 | |||||
6. [FAQS](https://github.com/zhayujie/chatgpt-on-wechat/wiki/FAQs) 中无类似问题 | |||||
5. 拓展功能请执行`pip3 install -r requirements-optional.txt`,检查依赖是否满足 | |||||
6. 在已有 issue 中未搜索到类似问题 | |||||
7. [FAQS](https://github.com/zhayujie/chatgpt-on-wechat/wiki/FAQs) 中无类似问题 | |||||
### 问题描述 | ### 问题描述 | ||||
@@ -18,7 +19,7 @@ | |||||
### 终端日志 (如有报错) | ### 终端日志 (如有报错) | ||||
``` | ``` | ||||
[在此处粘贴终端日志] | |||||
[在此处粘贴终端日志, 可在主目录下`run.log`文件中找到] | |||||
``` | ``` | ||||
@@ -65,7 +65,7 @@ | |||||
### 2.运行环境 | ### 2.运行环境 | ||||
支持 Linux、MacOS、Windows 系统(可在Linux服务器上长期运行),同时需安装 `Python`。 | 支持 Linux、MacOS、Windows 系统(可在Linux服务器上长期运行),同时需安装 `Python`。 | ||||
> 建议Python版本在 3.7.1~3.9.X 之间,3.10及以上版本在 MacOS 可用,其他系统上不确定能否正常运行。 | |||||
> 建议Python版本在 3.7.1~3.9.X 之间,推荐3.8版本,3.10及以上版本在 MacOS 可用,其他系统上不确定能否正常运行。 | |||||
**(1) 克隆项目代码:** | **(1) 克隆项目代码:** | ||||
@@ -80,9 +80,15 @@ cd chatgpt-on-wechat/ | |||||
pip3 install -r requirements.txt | pip3 install -r requirements.txt | ||||
``` | ``` | ||||
其中`tiktoken`要求`python`版本在3.8以上,它用于精确计算会话使用的tokens数量,可以不装但建议安装。 | |||||
**(3) 拓展依赖 (可选,建议安装):** | |||||
```bash | |||||
pip3 install -r requirements-optional.txt | |||||
``` | |||||
> 如果某项依赖安装失败请注释掉对应的行再继续。 | |||||
其中`tiktoken`要求`python`版本在3.8以上,它用于精确计算会话使用的tokens数量,强烈建议安装。 | |||||
**(3) 拓展依赖 (可选):** | |||||
使用`google`或`baidu`语音识别需安装`ffmpeg`, | 使用`google`或`baidu`语音识别需安装`ffmpeg`, | ||||
@@ -90,10 +96,12 @@ pip3 install -r requirements.txt | |||||
参考[#415](https://github.com/zhayujie/chatgpt-on-wechat/issues/415) | 参考[#415](https://github.com/zhayujie/chatgpt-on-wechat/issues/415) | ||||
使用`azure`语音功能需安装依赖: | |||||
使用`azure`语音功能需安装依赖(列在`requirements-optional.txt`内,但为便于`railway`部署已注释): | |||||
```bash | ```bash | ||||
pip3 install azure-cognitiveservices-speech | pip3 install azure-cognitiveservices-speech | ||||
``` | ``` | ||||
> 目前默认发布的镜像和`railway`部署,都基于`apline`,无法安装`azure`的依赖。若有需求请自行基于[`debian`](https://github.com/zhayujie/chatgpt-on-wechat/blob/master/docker/Dockerfile.debian.latest)打包。 | > 目前默认发布的镜像和`railway`部署,都基于`apline`,无法安装`azure`的依赖。若有需求请自行基于[`debian`](https://github.com/zhayujie/chatgpt-on-wechat/blob/master/docker/Dockerfile.debian.latest)打包。 | ||||
参考[文档](https://learn.microsoft.com/en-us/azure/cognitive-services/speech-service/quickstarts/setup-platform?pivots=programming-language-python&tabs=linux%2Cubuntu%2Cdotnet%2Cjre%2Cmaven%2Cnodejs%2Cmac%2Cpypi) | 参考[文档](https://learn.microsoft.com/en-us/azure/cognitive-services/speech-service/quickstarts/setup-platform?pivots=programming-language-python&tabs=linux%2Cubuntu%2Cdotnet%2Cjre%2Cmaven%2Cnodejs%2Cmac%2Cpypi) | ||||
@@ -23,6 +23,7 @@ RUN apk add --no-cache \ | |||||
&& cp config-template.json ${BUILD_PREFIX}/config.json \ | && cp config-template.json ${BUILD_PREFIX}/config.json \ | ||||
&& /usr/local/bin/python -m pip install --no-cache --upgrade pip \ | && /usr/local/bin/python -m pip install --no-cache --upgrade pip \ | ||||
&& pip install --no-cache -r requirements.txt \ | && pip install --no-cache -r requirements.txt \ | ||||
&& pip install --no-cache -r requirements-optional.txt \ | |||||
&& apk del curl wget | && apk del curl wget | ||||
WORKDIR ${BUILD_PREFIX} | WORKDIR ${BUILD_PREFIX} | ||||
@@ -23,7 +23,8 @@ RUN apt-get update \ | |||||
&& cd ${BUILD_PREFIX} \ | && cd ${BUILD_PREFIX} \ | ||||
&& cp config-template.json ${BUILD_PREFIX}/config.json \ | && cp config-template.json ${BUILD_PREFIX}/config.json \ | ||||
&& /usr/local/bin/python -m pip install --no-cache --upgrade pip \ | && /usr/local/bin/python -m pip install --no-cache --upgrade pip \ | ||||
&& pip install --no-cache -r requirements.txt | |||||
&& pip install --no-cache -r requirements.txt \ | |||||
&& pip install --no-cache -r requirements-optional.txt | |||||
WORKDIR ${BUILD_PREFIX} | WORKDIR ${BUILD_PREFIX} | ||||
@@ -16,6 +16,7 @@ RUN apt-get update \ | |||||
&& cp config-template.json config.json \ | && cp config-template.json config.json \ | ||||
&& /usr/local/bin/python -m pip install --no-cache --upgrade pip \ | && /usr/local/bin/python -m pip install --no-cache --upgrade pip \ | ||||
&& pip install --no-cache -r requirements.txt \ | && pip install --no-cache -r requirements.txt \ | ||||
&& pip install --no-cache -r requirements-optional.txt \ | |||||
&& pip install azure-cognitiveservices-speech | && pip install azure-cognitiveservices-speech | ||||
WORKDIR ${BUILD_PREFIX} | WORKDIR ${BUILD_PREFIX} | ||||
@@ -13,7 +13,8 @@ RUN apk add --no-cache bash ffmpeg espeak \ | |||||
&& cd ${BUILD_PREFIX} \ | && cd ${BUILD_PREFIX} \ | ||||
&& cp config-template.json config.json \ | && cp config-template.json config.json \ | ||||
&& /usr/local/bin/python -m pip install --no-cache --upgrade pip \ | && /usr/local/bin/python -m pip install --no-cache --upgrade pip \ | ||||
&& pip install --no-cache -r requirements.txt | |||||
&& pip install --no-cache -r requirements.txt \ | |||||
&& pip install --no-cache -r requirements-optional.txt | |||||
WORKDIR ${BUILD_PREFIX} | WORKDIR ${BUILD_PREFIX} | ||||
@@ -0,0 +1,18 @@ | |||||
tiktoken>=0.3.2 # openai calculate token | |||||
#voice | |||||
pydub>=0.25.1 # need ffmpeg | |||||
SpeechRecognition # google speech to text | |||||
gTTS>=2.3.1 # google text to speech | |||||
pyttsx3>=2.90 # pytsx text to speech | |||||
baidu_aip>=4.16.10 # baidu voice | |||||
# azure-cognitiveservices-speech # azure voice | |||||
# wechaty | |||||
wechaty>=0.10.7 | |||||
wechaty_puppet>=0.4.23 | |||||
pysilk_mod>=1.6.0 # needed by send voice | |||||
# webuiapi plugin | |||||
webuiapi>=0.6.2 | |||||
@@ -1,17 +1,6 @@ | |||||
openai>=0.27.2 | openai>=0.27.2 | ||||
baidu_aip>=4.16.10 | |||||
gTTS>=2.3.1 | |||||
HTMLParser>=0.0.2 | HTMLParser>=0.0.2 | ||||
pydub>=0.25.1 | |||||
PyQRCode>=1.2.1 | PyQRCode>=1.2.1 | ||||
pysilk>=0.0.1 | |||||
pysilk_mod>=1.6.0 | |||||
pyttsx3>=2.90 | |||||
qrcode>=7.4.2 | qrcode>=7.4.2 | ||||
requests>=2.28.2 | requests>=2.28.2 | ||||
webuiapi>=0.6.2 | |||||
wechaty>=0.10.7 | |||||
wechaty_puppet>=0.4.23 | |||||
chardet>=5.1.0 | |||||
SpeechRecognition | |||||
tiktoken>=0.3.2 | |||||
chardet>=5.1.0 |