Initial Commit 🚀 🚀

This commit is contained in:
Abhishek Kumar 2025-09-09 14:37:32 +05:30
commit 4f2a629340
444 changed files with 76863 additions and 0 deletions

View file

@ -0,0 +1,34 @@
from __future__ import annotations
"""Utilities for building default service configurations for a new user.
The defaults follow the same provider choices exposed by `/user/configurations/defaults`.
Values for `api_key` are pulled from environment variables named *{PROVIDER}_API_KEY*.
If an environment variable is missing, that particular provider configuration is
left as ``None``.
"""
from api.services.configuration.registry import (
DeepgramSTTConfiguration,
ElevenlabsTTSConfiguration,
OpenAILLMService,
ServiceProviders,
)
# Mapping of service to (provider enum, configuration class)
_DEFAULTS = {
"llm": (ServiceProviders.OPENAI, OpenAILLMService),
"tts": (ServiceProviders.ELEVENLABS, ElevenlabsTTSConfiguration),
"stt": (ServiceProviders.DEEPGRAM, DeepgramSTTConfiguration),
}
# Public mapping of service name -> default provider
DEFAULT_SERVICE_PROVIDERS = {
field: provider for field, (provider, _) in _DEFAULTS.items()
}
__all__ = [
"DEFAULT_SERVICE_PROVIDERS",
]