Skip to content

Commit

Permalink
Bugfix/gewechat requirements (#204)
Browse files Browse the repository at this point in the history
* fix: pydub requirement

* feat: set gewechat as default channel type
  • Loading branch information
hanfangyuan4396 authored Jan 16, 2025
1 parent 9c2c65c commit 8cf2f48
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
8 changes: 7 additions & 1 deletion config-template.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@
"dify_api_base": "https://api.dify.ai/v1",
"dify_api_key": "app-xxx",
"dify_app_type": "chatbot",
"channel_type": "wx",
"channel_type": "gewechat",
"gewechat_app_id": "",
"gewechat_token": "",
"gewechat_base_url": "",
"gewechat_callback_url": "",
"gewechat_download_url": "",
"debug": true,
"model": "dify",
"single_chat_prefix": [""],
"single_chat_reply_prefix": "",
Expand Down
5 changes: 4 additions & 1 deletion voice/audio_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
except ImportError:
logger.debug("import pysilk failed, wechaty voice message will not be supported.")

from pydub import AudioSegment
try:
from pydub import AudioSegment
except ImportError:
logger.warning("import pydub failed, wechat voice conversion will not be supported. Try: pip install pydub")

try:
import pilk
Expand Down

0 comments on commit 8cf2f48

Please sign in to comment.