Fix: add missing deps, lazy-load heavy modules in podcast mode
This commit is contained in:
@@ -5,50 +5,60 @@ The onboarding endpoints are re-exported from a stable module
|
|||||||
`onboarding.py`.
|
`onboarding.py`.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from .onboarding_endpoints import (
|
import os
|
||||||
health_check,
|
|
||||||
get_onboarding_status,
|
|
||||||
get_onboarding_progress_full,
|
|
||||||
get_step_data,
|
|
||||||
complete_step,
|
|
||||||
skip_step,
|
|
||||||
validate_step_access,
|
|
||||||
get_api_keys,
|
|
||||||
save_api_key,
|
|
||||||
validate_api_keys,
|
|
||||||
start_onboarding,
|
|
||||||
complete_onboarding,
|
|
||||||
reset_onboarding,
|
|
||||||
get_resume_info,
|
|
||||||
get_onboarding_config,
|
|
||||||
generate_writing_personas,
|
|
||||||
generate_writing_personas_async,
|
|
||||||
get_persona_task_status,
|
|
||||||
assess_persona_quality,
|
|
||||||
regenerate_persona,
|
|
||||||
get_persona_generation_options
|
|
||||||
)
|
|
||||||
|
|
||||||
__all__ = [
|
# Check podcast mode early
|
||||||
'health_check',
|
_is_podcast = os.getenv("ALWRITY_ENABLED_FEATURES", "").strip().lower() == "podcast"
|
||||||
'get_onboarding_status',
|
|
||||||
'get_onboarding_progress_full',
|
# In podcast mode, don't import heavy onboarding endpoints
|
||||||
'get_step_data',
|
# They trigger heavy dependencies (exa_py, etc.)
|
||||||
'complete_step',
|
if _is_podcast:
|
||||||
'skip_step',
|
__all__ = []
|
||||||
'validate_step_access',
|
else:
|
||||||
'get_api_keys',
|
from .onboarding_endpoints import (
|
||||||
'save_api_key',
|
health_check,
|
||||||
'validate_api_keys',
|
get_onboarding_status,
|
||||||
'start_onboarding',
|
get_onboarding_progress_full,
|
||||||
'complete_onboarding',
|
get_step_data,
|
||||||
'reset_onboarding',
|
complete_step,
|
||||||
'get_resume_info',
|
skip_step,
|
||||||
'get_onboarding_config',
|
validate_step_access,
|
||||||
'generate_writing_personas',
|
get_api_keys,
|
||||||
'generate_writing_personas_async',
|
save_api_key,
|
||||||
'get_persona_task_status',
|
validate_api_keys,
|
||||||
'assess_persona_quality',
|
start_onboarding,
|
||||||
'regenerate_persona',
|
complete_onboarding,
|
||||||
'get_persona_generation_options'
|
reset_onboarding,
|
||||||
]
|
get_resume_info,
|
||||||
|
get_onboarding_config,
|
||||||
|
generate_writing_personas,
|
||||||
|
generate_writing_personas_async,
|
||||||
|
get_persona_task_status,
|
||||||
|
assess_persona_quality,
|
||||||
|
regenerate_persona,
|
||||||
|
get_persona_generation_options
|
||||||
|
)
|
||||||
|
|
||||||
|
__all__ = [
|
||||||
|
'health_check',
|
||||||
|
'get_onboarding_status',
|
||||||
|
'get_onboarding_progress_full',
|
||||||
|
'get_step_data',
|
||||||
|
'complete_step',
|
||||||
|
'skip_step',
|
||||||
|
'validate_step_access',
|
||||||
|
'get_api_keys',
|
||||||
|
'save_api_key',
|
||||||
|
'validate_api_keys',
|
||||||
|
'start_onboarding',
|
||||||
|
'complete_onboarding',
|
||||||
|
'reset_onboarding',
|
||||||
|
'get_resume_info',
|
||||||
|
'get_onboarding_config',
|
||||||
|
'generate_writing_personas',
|
||||||
|
'generate_writing_personas_async',
|
||||||
|
'get_persona_task_status',
|
||||||
|
'assess_persona_quality',
|
||||||
|
'regenerate_persona',
|
||||||
|
'get_persona_generation_options'
|
||||||
|
]
|
||||||
@@ -31,6 +31,7 @@ httpx>=0.27.2,<0.28.0
|
|||||||
aiohttp>=3.9.0
|
aiohttp>=3.9.0
|
||||||
openai>=1.3.0
|
openai>=1.3.0
|
||||||
google-genai>=1.0.0
|
google-genai>=1.0.0
|
||||||
|
exa-py==1.9.1
|
||||||
gtts>=2.4.0
|
gtts>=2.4.0
|
||||||
pyttsx3>=2.90
|
pyttsx3>=2.90
|
||||||
markdown>=3.5.0
|
markdown>=3.5.0
|
||||||
@@ -51,6 +52,13 @@ requests>=2.31.0
|
|||||||
beautifulsoup4>=4.12.0
|
beautifulsoup4>=4.12.0
|
||||||
lxml>=4.9.0
|
lxml>=4.9.0
|
||||||
psutil>=5.9.0
|
psutil>=5.9.0
|
||||||
|
sentence-transformers>=2.2.2
|
||||||
|
google-api-python-client>=2.100.0
|
||||||
|
google-auth>=2.23.0
|
||||||
|
google-auth-oauthlib>=1.0.0
|
||||||
|
pydantic-settings>=2.0.0
|
||||||
|
python-dateutil>=2.8.0
|
||||||
|
jinja2>=3.1.0
|
||||||
EOF
|
EOF
|
||||||
python -m pip install --retries 10 --timeout 120 -r requirements_min.txt
|
python -m pip install --retries 10 --timeout 120 -r requirements_min.txt
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user