INNER CODE UNIT · Python
get_data_source
airweave-ai/error-monitoring-agent · backend/sources/__init__.py:27
def get_data_source(source_type: Optional[str] = None) -> DataSource:
"""
Get the configured data source.
Priority:
1. Explicit source_type parameter
2. DATA_SOURCE environment variable
3. Auto-detect based on available credentials
4. Fall back to sample data
Args:
source_type: Override source type (optional)
Returns:
Configured DataSource instance
"""
config = get_config()