bugfix
This commit is contained in:
parent
331efe97bb
commit
f1e2914e86
@ -77,9 +77,15 @@ async def uapi_request(request, sor, caller_orgid, callerid, uapi, llm, params):
|
|||||||
txt = ''
|
txt = ''
|
||||||
async for l in uapi.stream_linify(llm.upappid, llm.apiname, userid, params=params):
|
async for l in uapi.stream_linify(llm.upappid, llm.apiname, userid, params=params):
|
||||||
if l and l != '[DONE]':
|
if l and l != '[DONE]':
|
||||||
|
yiled_it = False
|
||||||
d = json.loads(l)
|
d = json.loads(l)
|
||||||
if d['content'] != '':
|
if d.get('reasoning_content'):
|
||||||
|
txt += d.get('reasoning_content')
|
||||||
|
yield_it = True
|
||||||
|
if d.get('content'):
|
||||||
txt = txt + d['content']
|
txt = txt + d['content']
|
||||||
|
yield_it = True
|
||||||
|
if yield_it:
|
||||||
yield l
|
yield l
|
||||||
debug(f'{d=}, {txt=}')
|
debug(f'{d=}, {txt=}')
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user