diff --git a/pytest.ini b/pytest.ini index ed2e4b8..b7a5232 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,3 +1,4 @@ [pytest] +pythonpath = . markers = - integration: marks tests that need access to external services \ No newline at end of file + integration: marks tests that need access to external services diff --git a/src/api/endpoints.py b/src/api/endpoints.py index 28b9601..852b1d9 100644 --- a/src/api/endpoints.py +++ b/src/api/endpoints.py @@ -7,7 +7,7 @@ from fastgpt_client.exceptions import ( ) from ..core.fastgpt_client import get_fastgpt_client from ..core.config import Config -from ..voice.text_chunker import SentenceTextChunker, SentenceTextChunkerConfig +from ..utils.text_chunker import SentenceTextChunker, SentenceTextChunkerConfig from loguru import logger import json import re diff --git a/src/utils/__init__.py b/src/utils/__init__.py new file mode 100644 index 0000000..f46a82a --- /dev/null +++ b/src/utils/__init__.py @@ -0,0 +1 @@ +"""Shared utility helpers.""" diff --git a/src/voice/text_chunker.py b/src/utils/text_chunker.py similarity index 100% rename from src/voice/text_chunker.py rename to src/utils/text_chunker.py diff --git a/test/test_text_chunker.py b/test/test_text_chunker.py index cb2f2ad..d608a2d 100644 --- a/test/test_text_chunker.py +++ b/test/test_text_chunker.py @@ -1,4 +1,4 @@ -from src.voice.text_chunker import SentenceTextChunker, SentenceTextChunkerConfig +from src.utils.text_chunker import SentenceTextChunker, SentenceTextChunkerConfig def test_chinese_sentence_chunks_wait_for_lookahead():