From f1e2914e86f436339193abcd214f199708cad28a Mon Sep 17 00:00:00 2001 From: yumoqing Date: Thu, 4 Sep 2025 12:13:46 +0800 Subject: [PATCH] bugfix --- llmage/llmclient.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/llmage/llmclient.py b/llmage/llmclient.py index 532a3fe..570a163 100644 --- a/llmage/llmclient.py +++ b/llmage/llmclient.py @@ -77,9 +77,15 @@ async def uapi_request(request, sor, caller_orgid, callerid, uapi, llm, params): txt = '' async for l in uapi.stream_linify(llm.upappid, llm.apiname, userid, params=params): if l and l != '[DONE]': + yiled_it = False d = json.loads(l) - if d['content'] != '': + if d.get('reasoning_content'): + txt += d.get('reasoning_content') + yield_it = True + if d.get('content'): txt = txt + d['content'] + yield_it = True + if yield_it: yield l debug(f'{d=}, {txt=}')