From b97a14d41d82fe650f19f0165b4e1e90d88d67ae Mon Sep 17 00:00:00 2001 From: yumoqing Date: Mon, 3 Aug 2026 14:58:52 +0800 Subject: [PATCH] bugfix --- wwwroot/v1/chat/completions/index.dspy | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wwwroot/v1/chat/completions/index.dspy b/wwwroot/v1/chat/completions/index.dspy index 87871bb..f15918b 100644 --- a/wwwroot/v1/chat/completions/index.dspy +++ b/wwwroot/v1/chat/completions/index.dspy @@ -4,8 +4,8 @@ async def gen(): try: if params_kw.stream: async for l in f(): - yield f'data: {l}\\n' - yield 'data: [DONE]\\n\\n' + yield f'data: {l}\n' + yield 'data: [DONE]\n\n' else: async for l in f(): yield l @@ -18,7 +18,7 @@ async def gen(): pass import json as _json err = _json.dumps({"error": str(e), "status": "FAILED"}, ensure_ascii=False) - yield f'data: {err}\\n' if params_kw.stream else err + yield f'data: {err}\n' if params_kw.stream else err debug_params('params_kw', params_kw) catelogid = params_kw.catelogid or 't2t'