From a38a718980b2390aa42177d4f33405930218cd86 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Mon, 8 Sep 2025 19:23:08 +0800 Subject: [PATCH] bugfix --- llmage/llmclient.py | 2 +- wwwroot/llm_dialog.ui | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/llmage/llmclient.py b/llmage/llmclient.py index 3a7f02a..6d6e473 100644 --- a/llmage/llmclient.py +++ b/llmage/llmclient.py @@ -132,7 +132,7 @@ async def async_uapi_request(request, llm, sor): b = b.decode('utf-8') rzt = DictObject(**json.loads(b)) yield b + '\n' - if not rzt.status: + if not rzt.status or rzt.status == 'FAILED': debug(f'{b=} return error') return if rzt.url: diff --git a/wwwroot/llm_dialog.ui b/wwwroot/llm_dialog.ui index e4ecc4d..80a7adc 100644 --- a/wwwroot/llm_dialog.ui +++ b/wwwroot/llm_dialog.ui @@ -14,7 +14,7 @@ { "llmid":"{{llm.id}}", "llmcatelogid":"{{llm.llmcatelogid}}", - "response_mode": "{{'stream' if llm.stream=='1' else 'sync'}}", + "response_mode": "{{llm.stream'}}", "output_view":{{llm.output_view}}, "icon":"{{entire_url('/appbase/get_icon.dspy')}}?id={{llm.iconid}}", "url":"{{entire_url('/llmage/llminference.dspy')}}",