对比发现 docs/index.html 使用 stream:true + getReader() SSE 流式 读取模型回复(已验证可用),而 persona-studio 使用非流式 JSON 请求 导致模型无法回复。 改动: - 发送请求时加入 stream: true 参数 - 使用 getReader() + TextDecoder 逐行读取 SSE 响应 - 解析 data: 行提取 delta.content 增量内容 - 实时更新对话气泡(逐字显示+光标) - CORS 失败时降级到后端代理(非流式) Co-authored-by: qinfendebingshuo <207279273+qinfendebingshuo@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| chat.html | ||
| chat.js | ||
| index.html | ||
| style.css | ||