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')}}",