This commit is contained in:
yumoqing 2026-02-12 14:03:30 +08:00
parent 3fd87280ec
commit 9f6349ea62

View File

@ -33,8 +33,11 @@ class LLMHandler:
kw = DictObject(**kw)
txt = ''
async for d in env.inference_generator(self.request, params_kw=kw):
debug(f'{d=}, {type(d)=}')
txt += d.content
try:
j = DictObject(**json.loads(d))
txt += j.content
except Exception as e:
exception(f'{e}\n{format_exc()}')
return txt
async def run_subprocess(command, cwd, env, timeout=30.0):