feat: complete dual-seat whole-vehicle orchestration
This commit is contained in:
@@ -9,6 +9,7 @@ from unittest.mock import patch
|
||||
from cognitive_agent.infrastructure.llm.openai_responses import (
|
||||
SYSTEM_PROMPT,
|
||||
OpenAIIntentInterpreter,
|
||||
build_intent_schema,
|
||||
)
|
||||
|
||||
|
||||
@@ -20,6 +21,7 @@ INTENT = {
|
||||
"capability": "seat.set_ventilation",
|
||||
"target_scope": "passenger",
|
||||
"operation": "activate",
|
||||
"duration_ms": None,
|
||||
"parameters": [
|
||||
{"name": "state", "value": "on"},
|
||||
{"name": "level", "value": 1},
|
||||
@@ -76,6 +78,16 @@ class OpenAIResponsesTests(unittest.TestCase):
|
||||
self.assertIn("longitudinal 20%", normalized)
|
||||
self.assertIn("do not invent catalog_only capabilities", normalized)
|
||||
|
||||
def test_explicit_seat_motion_duration_is_part_of_the_model_contract(self) -> None:
|
||||
normalized = " ".join(SYSTEM_PROMPT.split())
|
||||
self.assertIn("preserve that duration exactly in request.duration_ms", normalized)
|
||||
request_schema = build_intent_schema({})["properties"]["requests"]["items"]
|
||||
self.assertIn("duration_ms", request_schema["required"])
|
||||
self.assertEqual(
|
||||
request_schema["properties"]["duration_ms"]["type"],
|
||||
["integer", "null"],
|
||||
)
|
||||
|
||||
def test_non_streaming_structured_output(self) -> None:
|
||||
response_body = json.dumps({"output_text": json.dumps(INTENT)})
|
||||
environment = {
|
||||
|
||||
Reference in New Issue
Block a user