Files
chongming-config/workers/example/stream_chat.toml
T

14 lines
511 B
TOML
Raw Normal View History

2026-08-21 14:47:38 +08:00
[POST]
summary = "模拟 AI 流式对话(SSE,逐 token 输出)"
docstring = "流式端点示例:@rpc_method 返回生成器,框架逐块多回复推送,网关以 text/event-stream 转发。curl -N 可观察逐块到达。"
auth_required = false
stream = true
# 流式超时模型: timeout = 流总寿命上限(zenoh query deadline),
# stream_idle_timeout = 网关侧连续无数据块的最大间隔
timeout = 300.0
stream_idle_timeout = 10.0
params = [
"prompt: str",
"tokens: int"
]