diff --git a/README.md b/README.md index a5bfbb61..b495d01e 100644 --- a/README.md +++ b/README.md @@ -129,6 +129,9 @@ pip3 install -r requirements.txt ```bash pip3 install -r requirements-optional.txt ``` + +> 国内网络可使用镜像源加速:`pip3 install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple` + 如果某项依赖安装失败可注释掉对应的行后重试。 ## 二、配置 diff --git a/agent/prompt/workspace.py b/agent/prompt/workspace.py index a7c9599a..8581b237 100644 --- a/agent/prompt/workspace.py +++ b/agent/prompt/workspace.py @@ -358,7 +358,7 @@ _你刚刚启动,这是你的第一次对话。_ - 你希望给我起个什么名字? - 我该怎么称呼你? - 你希望我们是什么样的交流风格?(一行列举选项:如专业严谨、轻松幽默、温暖友好、简洁高效等) -4. **风格要求**:温暖自然、简洁清晰,整体控制在 100 字以内 +4. **风格要求**:温暖自然、简洁清晰,整体控制在 100 字以内,适当使用 emoji 让表达更生动有趣 5. 能力介绍和交流风格选项都只要一行,保持精简 6. 不要问太多其他信息(职业、时区等可以后续自然了解) diff --git a/docker/Dockerfile.latest b/docker/Dockerfile.latest index f33c964f..763ac920 100644 --- a/docker/Dockerfile.latest +++ b/docker/Dockerfile.latest @@ -17,8 +17,7 @@ RUN apt-get update \ && cp config-template.json config.json \ && /usr/local/bin/python -m pip install --no-cache --upgrade pip \ && pip install --no-cache -r requirements.txt \ - && pip install --no-cache -r requirements-optional.txt \ - && pip install azure-cognitiveservices-speech + && pip install --no-cache -r requirements-optional.txt WORKDIR ${BUILD_PREFIX} @@ -30,6 +29,4 @@ RUN chmod +x /entrypoint.sh \ && useradd -r -g agent -s /bin/bash -d /home/agent agent \ && chown -R agent:agent /home/agent ${BUILD_PREFIX} /usr/local/lib -USER agent - ENTRYPOINT ["/entrypoint.sh"] diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index f7f4cfa5..633fd26d 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -43,9 +43,15 @@ fi # fi -# go to prefix dir +# fix ownership of mounted volumes then drop to non-root user +if [ "$(id -u)" = "0" ]; then + mkdir -p /home/agent/cow + chown agent:agent /home/agent/cow + exec su agent -s /bin/bash -c "cd $CHATGPT_ON_WECHAT_PREFIX && $CHATGPT_ON_WECHAT_EXEC" +fi + +# fallback: already running as agent cd $CHATGPT_ON_WECHAT_PREFIX -# excute $CHATGPT_ON_WECHAT_EXEC diff --git a/docs/channels/weixin.mdx b/docs/channels/weixin.mdx index c3319930..c19974a4 100644 --- a/docs/channels/weixin.mdx +++ b/docs/channels/weixin.mdx @@ -1,9 +1,9 @@ --- title: 微信 -description: 将 CowAgent 接入个人微信 +description: 将 CowAgent 接入个人微信(基于官方接口) --- -> 接入个人微信,扫码登录即可使用,支持文本、图片、语音、文件、视频等消息的收发。 +> 接入个人微信,扫码登录即可使用,支持文本、图片、语音、文件、视频等消息的私聊收发。通过微信官方API进行接入,无安全风险,接入后会在会话中新增一个机器人助手,不影响当前账号的使用。 ## 一、配置和运行 diff --git a/docs/guide/manual-install.mdx b/docs/guide/manual-install.mdx index 819470a7..3b233284 100644 --- a/docs/guide/manual-install.mdx +++ b/docs/guide/manual-install.mdx @@ -30,6 +30,8 @@ pip3 install -r requirements.txt pip3 install -r requirements-optional.txt ``` +> 国内网络可使用镜像源加速:`pip3 install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple` + ### 3. 配置 复制配置文件模板并编辑: diff --git a/requirements-optional.txt b/requirements-optional.txt index 0707f119..c8cd9a63 100644 --- a/requirements-optional.txt +++ b/requirements-optional.txt @@ -2,14 +2,8 @@ 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 edge-tts # edge-tts -numpy<=1.24.2 -langid # language detect elevenlabs==1.0.3 # elevenlabs TTS #install plugin @@ -18,18 +12,9 @@ dulwich # xunfei spark websocket-client==1.2.0 -# claude API -anthropic==0.25.0 - -# tongyi qwen -broadscope_bailian - # google google-generativeai -# tencentcloud sdk -tencentcloud-sdk-python>=3.0.0 - # file parsing (web_fetch document support) pypdf python-docx