feat: merge reply emotions while preserving configurable Qwen/Doubao provider
This commit is contained in:
@@ -13,7 +13,7 @@ from test_gateway import Socket
|
||||
|
||||
|
||||
class ContinuityTests(unittest.IsolatedAsyncioTestCase):
|
||||
async def test_multidelta_one_tts_and_realtime_text(self):
|
||||
async def test_multidelta_one_tts_and_parsed_text(self):
|
||||
socket=Socket();tts=[]
|
||||
wav=io.BytesIO()
|
||||
with wave.open(wav,'wb') as w:
|
||||
@@ -25,7 +25,7 @@ class ContinuityTests(unittest.IsolatedAsyncioTestCase):
|
||||
stream=''.join('data: '+json.dumps({'choices':[{'delta':{'content':x}}]},ensure_ascii=False)+'\n\n' for x in parts)+'data: [DONE]\n\n'
|
||||
return httpx.Response(200,text=stream)
|
||||
tts.append(json.loads(request.content))
|
||||
self.assertEqual(len([e for e in socket.events if e['type']=='llm']),3)
|
||||
self.assertEqual([e['text'] for e in socket.events if e['type']=='llm'], [''.join(parts)])
|
||||
return httpx.Response(200,content=wav.getvalue())
|
||||
async with httpx.AsyncClient(transport=httpx.MockTransport(backend)) as client:
|
||||
d=Dialogue(socket,FakeModel(),client)
|
||||
|
||||
Reference in New Issue
Block a user