Skip to content

Commit 50dc513

Browse files
committed
add test cases
1 parent 139d218 commit 50dc513

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

core_backend/app/llm_call/process_input.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ def _process_identified_language_response(
184184
)
185185
error_type: ErrorType = ErrorType.UNINTELLIGIBLE_INPUT
186186
else:
187+
# TODO: create types for language x script combos
187188
if identified_script == IdentifiedScript.UNKNOWN:
188189
error_message = (
189190
"Unsupported script. "

core_backend/tests/api/test_question_answer.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1054,7 +1054,9 @@ def user_query_refined(self, request: pytest.FixtureRequest) -> QueryRefined:
10541054
("HINDI", "DEVANAGARI", False, None),
10551055
("UNINTELLIGIBLE", "LATIN", True, ErrorType.UNINTELLIGIBLE_INPUT),
10561056
("UNINTELLIGIBLE", "UNKNOWN", True, ErrorType.UNINTELLIGIBLE_INPUT),
1057-
("GIBBERISH", "UNKNOWN", True, ErrorType.UNSUPPORTED_SCRIPT),
1057+
("ENGLISH", "UNKNOWN", True, ErrorType.UNSUPPORTED_SCRIPT),
1058+
("ENGLISH", "Some unsupported script", True, ErrorType.UNSUPPORTED_SCRIPT),
1059+
("GIBBERISH", "UNKNOWN", True, ErrorType.UNSUPPORTED_LANGUAGE),
10581060
("GIBBERISH", "LATIN", True, ErrorType.UNSUPPORTED_LANGUAGE),
10591061
("UNSUPPORTED", "LATIN", True, ErrorType.UNSUPPORTED_LANGUAGE),
10601062
("SOME_UNSUPPORTED_LANG", "UNKNOWN", True, ErrorType.UNSUPPORTED_LANGUAGE),

0 commit comments

Comments
 (0)