fix: use chr(10) for newlines in NDJSON stream
This commit is contained in:
parent
70481ad17b
commit
d435c8b5ae
@ -200,7 +200,7 @@ if action == 'send_message':
|
|||||||
ctx = await _load_ctx(sor, uid)
|
ctx = await _load_ctx(sor, uid)
|
||||||
model = await _sel_model(sor, user_model_id)
|
model = await _sel_model(sor, user_model_id)
|
||||||
if not model:
|
if not model:
|
||||||
yield json.dumps({"type":"widget","widget":_w_card("❌ 错误",_w_text("无可用LLM"),"error")},ensure_ascii=False)+'\n'
|
yield json.dumps({"type":"widget","widget":_w_card("❌ 错误",_w_text("无可用LLM"),"error")},ensure_ascii=False)+chr(10)
|
||||||
return
|
return
|
||||||
|
|
||||||
repos_str = ', '.join([r['n'] for r in ctx['repos']]) or '无'
|
repos_str = ', '.join([r['n'] for r in ctx['repos']]) or '无'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user