feat: merge reply emotions while preserving configurable Qwen/Doubao provider

This commit is contained in:
zenord
2026-10-12 10:57:14 +08:00
parent 19a7adccd9
commit d43c7d4e80
36 changed files with 1264 additions and 98 deletions
+2 -2
View File
@@ -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)