From fc330f44097a546fd4cdfc6a7d39ef4ca01dc362 Mon Sep 17 00:00:00 2001 From: chakcy <947105045@qq.com> Date: Fri, 21 Aug 2026 14:47:38 +0800 Subject: [PATCH] =?UTF-8?q?modify:=20=E6=B5=81=E5=BC=8F=E8=BE=93=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- workers/example/stream_chat.toml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 workers/example/stream_chat.toml diff --git a/workers/example/stream_chat.toml b/workers/example/stream_chat.toml new file mode 100644 index 0000000..f8273e5 --- /dev/null +++ b/workers/example/stream_chat.toml @@ -0,0 +1,13 @@ +[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" +]