Files
chongming-config/workers/rsdemo/stream.toml
T
2026-08-22 03:27:32 +08:00

14 lines
538 B
TOML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# rsdemo.stream —— 流式端点(SSE,逐块多回复)
[POST]
summary = "Rust 参考插件:模拟 AI 流式输出(SSE,逐 token)"
docstring = "流式端点:Rust handler 返回流,逐块多回复推送,网关以 text/event-stream 转发。tokens > 50 时第 26 块抛错,演示 {\"error\": ...} 收尾块。"
auth_required = false
stream = true
# 流式超时模型: timeout = 流总寿命上限(zenoh query deadline)
timeout = 300.0
stream_idle_timeout = 10.0
params = [
"prompt: str",
"tokens: int"
]