test: verify real kbqa workflow

This commit is contained in:
gqt
2026-07-13 14:23:06 +08:00
parent 52184aa00e
commit 2361d62867
32 changed files with 656 additions and 12 deletions
+8
View File
@@ -0,0 +1,8 @@
from kbqa.chat.sse import encode_event, encode_ping
def test_sse_encodes_single_line_utf8_json() -> None:
assert encode_event("token", {"content": "知识"}) == (
'event: token\ndata: {"content":"知识"}\n\n'.encode()
)
assert encode_ping() == b": ping\n\n"