feat: Add VLMConfig to schema for proper config.yaml VLM support
This commit is contained in:
@@ -149,13 +149,14 @@ Output ONLY the JSON object, no additional text."""
|
||||
# Priority: Environment variables > config.yaml > defaults
|
||||
from pixelle_video.config import config_manager
|
||||
|
||||
# Try to get VLM config from config.yaml
|
||||
vlm_config = getattr(config_manager.config, 'vlm', None)
|
||||
# VLM config from config.yaml (now part of PixelleVideoConfig)
|
||||
vlm_config = config_manager.config.vlm
|
||||
|
||||
vlm_provider = os.getenv("VLM_PROVIDER") or (vlm_config.provider if vlm_config and hasattr(vlm_config, 'provider') else "qwen")
|
||||
vlm_api_key = os.getenv("VLM_API_KEY") or os.getenv("DASHSCOPE_API_KEY") or (vlm_config.api_key if vlm_config and hasattr(vlm_config, 'api_key') else None)
|
||||
vlm_base_url = os.getenv("VLM_BASE_URL") or (vlm_config.base_url if vlm_config and hasattr(vlm_config, 'base_url') else None)
|
||||
vlm_model = os.getenv("VLM_MODEL") or (vlm_config.model if vlm_config and hasattr(vlm_config, 'model') else None)
|
||||
# Environment variables override config.yaml
|
||||
vlm_provider = os.getenv("VLM_PROVIDER") or vlm_config.provider or "qwen"
|
||||
vlm_api_key = os.getenv("VLM_API_KEY") or os.getenv("DASHSCOPE_API_KEY") or vlm_config.api_key
|
||||
vlm_base_url = os.getenv("VLM_BASE_URL") or vlm_config.base_url
|
||||
vlm_model = os.getenv("VLM_MODEL") or vlm_config.model
|
||||
|
||||
# Configure based on provider
|
||||
if vlm_provider == "qwen":
|
||||
|
||||
Reference in New Issue
Block a user