mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-06-02 00:57:41 +08:00
- Receive audio messages: map msg_type=audio to ContextType.VOICE and
download opus file via lazy _prepare_fn for STT pipeline
- Send voice replies: upload opus audio via Feishu file API, auto-convert
non-opus formats (e.g. mp3) using pydub before upload
- Streaming text reply: inject on_event callback into context; send a
card
placeholder on first delta, then PATCH-update it in-place at a
configurable interval (feishu_stream_interval_ms) to achieve typewriter
effect; set feishu_streamed=True to suppress duplicate send()
- Enable NOT_SUPPORT_REPLYTYPE=[] to unblock voice and image reply types
- Fix AudioSegment mutation bug in audio_convert.py: set_frame_rate /
set_channels return new objects and must be reassigned
- Add -nostdin to ffmpeg invocation to prevent stdin deadlock in daemon
- Add feishu_bot_name, feishu_stream_reply, feishu_stream_interval_ms
config keys to config-template.json
42 lines
1.1 KiB
JSON
42 lines
1.1 KiB
JSON
{
|
|
"channel_type": "weixin",
|
|
"model": "deepseek-v4-flash",
|
|
"deepseek_api_key": "",
|
|
"deepseek_api_base": "https://api.deepseek.com/v1",
|
|
"minimax_api_key": "",
|
|
"zhipu_ai_api_key": "",
|
|
"ark_api_key": "",
|
|
"moonshot_api_key": "",
|
|
"dashscope_api_key": "",
|
|
"claude_api_key": "",
|
|
"claude_api_base": "https://api.anthropic.com/v1",
|
|
"open_ai_api_key": "",
|
|
"open_ai_api_base": "https://api.openai.com/v1",
|
|
"gemini_api_key": "",
|
|
"gemini_api_base": "https://generativelanguage.googleapis.com",
|
|
"voice_to_text": "openai",
|
|
"text_to_voice": "openai",
|
|
"voice_reply_voice": false,
|
|
"speech_recognition": true,
|
|
"group_speech_recognition": false,
|
|
"use_linkai": false,
|
|
"linkai_api_key": "",
|
|
"linkai_app_code": "",
|
|
"feishu_app_id": "",
|
|
"feishu_app_secret": "",
|
|
"feishu_bot_name": "",
|
|
"feishu_stream_reply": true,
|
|
"feishu_stream_interval_ms": 100,
|
|
"dingtalk_client_id": "",
|
|
"dingtalk_client_secret": "",
|
|
"wecom_bot_id": "",
|
|
"wecom_bot_secret": "",
|
|
"web_password": "",
|
|
"agent": true,
|
|
"agent_max_context_tokens": 50000,
|
|
"agent_max_context_turns": 20,
|
|
"agent_max_steps": 20,
|
|
"enable_thinking": false,
|
|
"knowledge": true
|
|
}
|