mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-07 03:59:13 +08:00
The channel trailed the model by up to 20s and finished long after the WebUI. Every sync SDK call opened a fresh connection (DNS + TCP + TLS ≈2s per call) and the serial outbound lane paid it per message. - route lark-oapi's sync calls through one keep-alive session per worker thread: measured 2.03s → 0.68s per call (0.55s warm) - create the streaming card carrying its first text instead of pushing that text in a second API call - ask CardKit for a printable pace (streaming_config) instead of the platform default of one character per 70ms - stop retrying card creation on every delta; after three failures the reply falls back to a regular card instead of dribbling out - throttle stream edits to 1s so the lane stays ahead of the model - make group threading configurable, and always reply flat in single chats - post a brief "thinking…" notice while the model reasons and retract it once the answer starts: reasoning events never reach a channel, so such a turn used to look dead - close the SDK WebSocket client on stop, so a reload cannot leave a second listener subscribed to the same app