Skip to content
Closed
Show file tree
Hide file tree
Changes from 33 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
824145f
fix(wecombot): improve dify streaming reply handling
Mar 10, 2026
17704e4
perf(wecombot): optimize streaming message performance
bjhx2003 Mar 10, 2026
7d3190f
fix(wecombot): harden pull stream lifecycle
bjhx2003 Mar 11, 2026
6f32b3b
perf(docker): optimize build cache for faster rebuilds
bjhx2003 Mar 11, 2026
25b6318
perf(docker): reduce image size by 400MB
bjhx2003 Mar 11, 2026
039a6d4
fix(docker): set python path for src layout
bjhx2003 Mar 11, 2026
2d5ef8d
fix(release): align version and compose image source
bjhx2003 Mar 11, 2026
92b1570
fix(wecombot): 完善企微拉流配置分层与收口机制
bjhx2003 Mar 11, 2026
2ddddc2
fix(difysvapi): handle workflow_finished event to properly end stream
bjhx2003 Mar 11, 2026
632c817
feat(wecombot): add toggle switch for pull mode pending placeholder
bjhx2003 Mar 11, 2026
f930b89
feat(wecom): add detailed streaming logs for debugging
bjhx2003 Mar 11, 2026
33dcf9a
feat(chroma): add full-text and hybrid search support
bjhx2003 Mar 11, 2026
4b4c7e5
refactor(pipeline): merge exception handling into single strategy option
bjhx2003 Mar 11, 2026
0226f13
fix(rag): keep session context in retrieval_settings for plugin compa…
bjhx2003 Mar 11, 2026
6ab32af
test(dify): update tests for adapter config and workflow_finished event
bjhx2003 Mar 11, 2026
c54d9fc
fix(dify,wecombot): move Dify stream throttling config to pipeline ou…
bjhx2003 Mar 11, 2026
66d47f6
chore(wecombot): align packaging files and trim debug logs
bjhx2003 Mar 11, 2026
aed7c54
fix(wecombot): restore compatibility defaults and wrapper behavior
bjhx2003 Mar 11, 2026
7c0b865
fix(difysvapi): restore workflow output compatibility in streaming
bjhx2003 Mar 11, 2026
4786eee
chore: Remove unused assignment of `published` variable from `stream_…
bjhx2003 Mar 12, 2026
7d580cf
refactor(wecombot): isolate pull stream policy and webhook-only visib…
bjhx2003 Mar 13, 2026
6dd1ffc
merge(master): rehearse merge with wecom webhook-only strategy
bjhx2003 Mar 13, 2026
91e59c8
Merge branch 'langbot-app:master' into feat/wecom
bjhx2003 Mar 16, 2026
8f97d93
style(wecombot): format files with ruff
bjhx2003 Mar 16, 2026
c3e175b
fix(wecombot): preserve websocket compatibility with pull enhancements
bjhx2003 Mar 16, 2026
5cbd604
refactor(wecombot): minimize drift from master config behavior
bjhx2003 Mar 16, 2026
7791dd1
fix(plugin): tolerate older runtime sdk without vector list
bjhx2003 Mar 16, 2026
aa957ed
merge(master): resolve plugin handler conflict and keep runtime sdk c…
bjhx2003 Mar 17, 2026
5e4f21b
feat(wecomcs): add redis streams scheduler and kf app support
bjhx2003 Mar 26, 2026
81835de
Merge remote-tracking branch 'origin/master' into feat/jjl
bjhx2003 Mar 26, 2026
93e4c58
fix(wecomcs): isolate bot streams and pipeline sessions
bjhx2003 Mar 27, 2026
ed51cce
feat(dify): 持久化 Redis 会话绑定并补充 README 增强说明
bjhx2003 Mar 27, 2026
b47c5fa
merge(feat/wecom): 合并 feat/jjl 的增强改动
bjhx2003 Mar 27, 2026
fcd036c
docs(readme): 补充分支相对官方版本的增强能力说明
bjhx2003 Mar 27, 2026
86ac50b
fix(wecomcs): prevent history replay and duplicate outbound msgids
bjhx2003 Mar 27, 2026
f26e6cc
feat(pipeline): add dify session settings and recovery flow
bjhx2003 Mar 31, 2026
c156439
fix(web): show dify session settings in create and edit flows
bjhx2003 Mar 31, 2026
a9c585a
chore(gitignore): ignore local agent workflow artifacts
bjhx2003 Mar 31, 2026
168360f
fix(wecomcs): restore sharding config and prevent history replay
bjhx2003 Mar 31, 2026
e2673e2
fix(web): prevent pipeline AI tab crash on create
bjhx2003 Apr 1, 2026
4369466
fix(pipeline): preserve submitted config when creating pipeline
bjhx2003 Apr 1, 2026
84121bc
update:合并群聊模式下userid的生成
Saiyuekin Apr 2, 2026
117dd6f
Merge pull request #1 from Saiyuekin/feat/wecom
bjhx2003 Apr 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,36 @@
# Version control
.github
.git

# Development
.venv
.vscode
.idea

# Data and temp
.data
.temp
*.log

# Frontend build artifacts
web/.next
web/node_modules
web/.env

# Documentation (not needed in runtime)
docs
*.md
!README.md

# Tests (not needed in runtime)
tests
pytest.ini

# CI/CD
.gitlab-ci.yml
.travis.yml

# Misc
*.pyc
__pycache__
.DS_Store
17 changes: 12 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# ========== 前端构建阶段 ==========
FROM node:22-alpine AS node

WORKDIR /app
Expand All @@ -10,14 +11,20 @@ FROM python:3.12.7-slim

WORKDIR /app

COPY . .

COPY --from=node /app/web/out ./web/out
# 先复制依赖文件和后端运行必需源代码,尽量利用 Docker 层缓存
COPY pyproject.toml uv.lock README.md LICENSE main.py ./
COPY src ./src

# 安装系统依赖和 Python 依赖(排除开发依赖)
RUN apt update \
&& apt install gcc -y \
&& python -m pip install --no-cache-dir uv \
&& uv sync \
&& uv sync --no-dev \
&& apt-get purge -y gcc \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/* \
&& touch /.dockerenv

CMD [ "uv", "run", "--no-sync", "main.py" ]
COPY --from=node /app/web/out ./web/out

CMD [ "uv", "run", "--no-sync", "main.py" ]
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,20 @@ English / [简体中文](README_CN.md) / [繁體中文](README_TW.md) / [日本

LangBot is an **open-source, production-grade platform** for building AI-powered instant messaging bots. It connects Large Language Models (LLMs) to any chat platform, enabling you to create intelligent agents that can converse, execute tasks, and integrate with your existing workflows.

## Enhancements in This Branch

Compared with the upstream official branch, this maintained branch includes several practical enhancements focused on WeCom / WeChat operations and long-running session reliability:

- **WeCom Customer Service runtime enhancements** — Redis-backed scheduling, state persistence, retry handling, token cache, and sharded processing for more stable large-volume customer service workloads.
- **WeCom app managed customer service adapter** — Added `wecom_kf_app` support for scenarios where customer service is managed through a WeCom application authorization model.
- **Dify conversation persistence** — Persist Dify `conversation_id` bindings in Redis and clear them on explicit session resets, reducing context loss after runtime restarts.
- **OpenClaw WeChat adapter support** — Added OpenClaw-based WeChat integration for additional WeChat connectivity scenarios.
- **WeCom / WeChat integration hardening** — Additional fixes and runtime improvements around session isolation, callback handling, and customer-service message processing.

These enhancements are especially useful for teams running LangBot in private deployments with heavier WeCom / WeChat customer-service traffic and stronger context-continuity requirements.

---

### Key Capabilities

- **AI Conversations & Agents** — Multi-turn dialogues, tool calling, multi-modal support, streaming output. Built-in RAG (knowledge base) with deep integration to [Dify](https://dify.ai), [Coze](https://coze.com), [n8n](https://n8n.io), [Langflow](https://langflow.org).
Expand Down
15 changes: 15 additions & 0 deletions docker/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,21 @@ version: "3"

services:

redis:
image: redis:7-alpine
container_name: langbot_redis
restart: on-failure
command: ["redis-server", "--appendonly", "yes"]
volumes:
- ./data/redis:/data
environment:
- TZ=Asia/Shanghai
ports:
- 6379:6379
networks:
- langbot_network


langbot_plugin_runtime:
image: rockchin/langbot:latest
container_name: langbot_plugin_runtime
Expand Down
Loading