feat: 新增追问模式和iOS本地化,重构后端输出模型

This commit is contained in:
qzl
2026-04-29 14:26:15 +08:00
parent f497afbff2
commit 16cb47e75a
39 changed files with 1346 additions and 600 deletions
+2 -2
View File
@@ -87,7 +87,7 @@ def test_build_instruction_no_language_constraint_when_none() -> None:
@pytest.mark.asyncio
async def test_finalize_json_response_returns_alias_keys() -> None:
model = _Model(payload={"ganzhi": {"yearGanZhi": "丙午"}})
_, payload = await finalize_json_response(
_, result = await finalize_json_response(
model=model,
formatter=_Formatter(),
base_messages=[],
@@ -95,4 +95,4 @@ async def test_finalize_json_response_returns_alias_keys() -> None:
retries=0,
)
assert payload == {"ganzhi": {"yearGanZhi": "丙午"}}
assert result.model_dump(mode="json", by_alias=True) == {"ganzhi": {"yearGanZhi": "丙午"}}