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:
2025-08-01 12:13:00 -06:00
committed by GitHub
parent 1878834ce6
commit 28ac031ff6
25 changed files with 284 additions and 1539 deletions

View 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