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) kw = DictObject(**kw)
txt = '' txt = ''
async for d in env.inference_generator(self.request, params_kw=kw): async for d in env.inference_generator(self.request, params_kw=kw):
debug(f'{d=}, {type(d)=}') try:
txt += d.content j = DictObject(**json.loads(d))
txt += j.content
except Exception as e:
exception(f'{e}\n{format_exc()}')
return txt return txt
async def run_subprocess(command, cwd, env, timeout=30.0): async def run_subprocess(command, cwd, env, timeout=30.0):