mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-20 20:29:06 +00:00
feat: use llamaindex everywhere (#525)
* feat: use llamaindex for transcript final title too * refactor: removed llm backend, replaced with one single class+llamaindex * refactor: self-review * fix: typing * fix: tests * refactor: extract clean_title and add tests * test: fix * test: remove ensure_casing/nltk * fix: tiny mistake
This commit is contained in:
21
server/tests/test_utils_text.py
Normal file
21
server/tests/test_utils_text.py
Normal file
@@ -0,0 +1,21 @@
|
||||
import pytest
|
||||
|
||||
from reflector.utils.text import clean_title
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"input_title,expected",
|
||||
[
|
||||
("hello world", "Hello World"),
|
||||
("HELLO WORLD", "Hello World"),
|
||||
("hello WORLD", "Hello World"),
|
||||
("the quick brown fox", "The Quick Brown fox"),
|
||||
("discussion about API design", "Discussion About api Design"),
|
||||
("Q1 2024 budget review", "Q1 2024 Budget Review"),
|
||||
("'Title with quotes'", "Title With Quotes"),
|
||||
("'title with quotes'", "Title With Quotes"),
|
||||
("MiXeD CaSe WoRdS", "Mixed Case Words"),
|
||||
],
|
||||
)
|
||||
def test_clean_title(input_title, expected):
|
||||
assert clean_title(input_title) == expected
|
||||
Reference in New Issue
Block a user