Implemented the spoken_word LLM review module
This commit is contained in:
@@ -60,6 +60,7 @@ def test_process_transcript_runs_noop_framework(tmp_path):
|
||||
{"corrections": []},
|
||||
{"corrections": []},
|
||||
{"corrections": []},
|
||||
{"corrections": []},
|
||||
]
|
||||
)
|
||||
revised = process_transcript(
|
||||
@@ -76,6 +77,7 @@ def test_process_transcript_runs_noop_framework(tmp_path):
|
||||
"glossary_1:proposal",
|
||||
"homophones:proposal",
|
||||
"glossary_2:proposal",
|
||||
"spoken_word:proposal",
|
||||
]
|
||||
|
||||
|
||||
@@ -105,6 +107,7 @@ def test_process_transcript_result_writes_report_and_preserves_skips_per_policy(
|
||||
{"corrections": []},
|
||||
{"corrections": []},
|
||||
{"corrections": []},
|
||||
{"corrections": []},
|
||||
]
|
||||
)
|
||||
result = process_transcript_result(_transcript(), _glossary(), config, llm_client=llm_client)
|
||||
@@ -126,6 +129,12 @@ def test_process_transcript_result_writes_report_and_preserves_skips_per_policy(
|
||||
"spoken_form_plausibility_review",
|
||||
"meaning_reversal_review",
|
||||
]
|
||||
assert [validator["name"] for validator in result.report.modules[3].to_dict()["validators"]] == [
|
||||
"proposal_confidence_guard",
|
||||
"protected_glossary_guard",
|
||||
"spoken_word_review",
|
||||
"meaning_reversal_review",
|
||||
]
|
||||
|
||||
|
||||
def test_external_report_can_be_written(tmp_path):
|
||||
@@ -135,6 +144,7 @@ def test_external_report_can_be_written(tmp_path):
|
||||
{"corrections": []},
|
||||
{"corrections": []},
|
||||
{"corrections": []},
|
||||
{"corrections": []},
|
||||
]
|
||||
)
|
||||
result = process_transcript_result(_transcript(), _glossary(), config, llm_client=llm_client)
|
||||
@@ -175,7 +185,12 @@ def test_default_module_specs_expose_final_validator_order():
|
||||
"spoken_form_plausibility_review",
|
||||
"meaning_reversal_review",
|
||||
]
|
||||
assert [validator.name for validator in specs[3].module.validators()] == ["protected_glossary_guard"]
|
||||
assert [validator.name for validator in specs[3].module.validators()] == [
|
||||
"proposal_confidence_guard",
|
||||
"protected_glossary_guard",
|
||||
"spoken_word_review",
|
||||
"meaning_reversal_review",
|
||||
]
|
||||
assert [validator.name for validator in specs[4].module.validators()] == ["protected_glossary_guard"]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user