This commit is contained in:
yumoqing 2025-09-19 15:11:14 +08:00
parent 813f92c03d
commit f2528d7558

View File

@ -100,6 +100,8 @@ async def uapi_request(request, llm, sor):
params=env.params_kw): params=env.params_kw):
if isinstance(l, bytes): if isinstance(l, bytes):
l = l.decode('utf-8') l = l.decode('utf-8')
if l[-1] == '\n':
l = l[:-1]
debug(f'stream response line={l},{type(l)}') debug(f'stream response line={l},{type(l)}')
l = ''.join(l.split('\n')) l = ''.join(l.split('\n'))
if l and l != '[DONE]': if l and l != '[DONE]':