Implement unified story generation flow
This commit is contained in:
@@ -299,6 +299,21 @@ class TestProviderPolicy:
|
||||
assert result.transcript_text == "我想听一个小熊找星星的故事"
|
||||
assert result.confidence == 1.0
|
||||
assert result.provider == "demo"
|
||||
|
||||
def test_openai_asr_default_config_uses_openai_env(self):
|
||||
from app.services.provider_router import _get_default_config
|
||||
|
||||
with patch("app.services.provider_router.settings") as mock_settings:
|
||||
mock_settings.openai_api_key = "openai-key"
|
||||
mock_settings.openai_api_base = "https://api.example.com/v1"
|
||||
mock_settings.voice_transcription_model = "gpt-4o-mini-transcribe"
|
||||
|
||||
config = _get_default_config("openai_asr")
|
||||
|
||||
assert config is not None
|
||||
assert config.api_key == "openai-key"
|
||||
assert config.api_base == "https://api.example.com/v1"
|
||||
assert config.model == "gpt-4o-mini-transcribe"
|
||||
|
||||
|
||||
class TestProviderConfigFromDB:
|
||||
|
||||
Reference in New Issue
Block a user