feat: add single-call action protocol and Android stage interfaces

This commit is contained in:
zenord
2026-10-13 00:41:55 +08:00
parent dfd1372ba2
commit e91354c9e8
41 changed files with 1438 additions and 70 deletions
+2 -2
View File
@@ -10,7 +10,7 @@ from gateway import Dialogue
from tests_fake import FakeModel
from test_gateway import Socket
from llm_provider import LLMProvider
from reply_emotion import REPLY_SCHEMA
from action_reply import ACTION_SCHEMA
class EmotionPipelineTests(unittest.IsolatedAsyncioTestCase):
async def test_seven_states_no_envelope_in_body_history_or_tts(self):
@@ -32,7 +32,7 @@ class EmotionPipelineTests(unittest.IsolatedAsyncioTestCase):
if 'chat' in request.url.path:
data=json.loads(request.content);self.assertEqual([m['role'] for m in data['messages']],['system','user'])
model_requests.append(data)
self.assertEqual(data['response_format']['json_schema']['schema'],REPLY_SCHEMA)
self.assertEqual(data['response_format']['json_schema']['schema'],ACTION_SCHEMA)
self.assertEqual(data['max_tokens'],160)
self.assertIn('角色设定只约束reply字段的可朗读正文',data['messages'][0]['content'])
self.assertNotIn('旧有不输出JSON',data['messages'][0]['content'])