From 1f3b3e2e3cbffcb400f72863ae54a502ce1ea45a Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Tue, 13 Jan 2026 14:55:48 +0530 Subject: [PATCH] chore: minor fixes --- api/services/configuration/registry.py | 18 +++++++++++++----- api/services/looptalk/core/pipeline_builder.py | 1 - api/services/pipecat/run_pipeline.py | 1 - api/services/pipecat/service_factory.py | 11 ++++++++++- api/services/workflow/pipecat_engine.py | 4 +--- .../workflow/pipecat_engine_callbacks.py | 2 +- 6 files changed, 25 insertions(+), 12 deletions(-) diff --git a/api/services/configuration/registry.py b/api/services/configuration/registry.py index 5f9d043..509e9e3 100644 --- a/api/services/configuration/registry.py +++ b/api/services/configuration/registry.py @@ -122,7 +122,7 @@ GROQ_MODELS = [ "openai/gpt-oss-120b", ] AZURE_MODELS = ["gpt-4.1-mini"] -DOGRAH_LLM_MODELS = ["default", "accurate", "fast", "lite", "zen", "zen_lite"] +DOGRAH_LLM_MODELS = ["default", "accurate", "fast", "lite", "zen"] @register_llm @@ -266,9 +266,13 @@ SARVAM_LANGUAGES = [ @register_tts class SarvamTTSConfiguration(BaseTTSConfiguration): provider: Literal[ServiceProviders.SARVAM] = ServiceProviders.SARVAM - model: str = Field(default="bulbul:v2", json_schema_extra={"examples": SARVAM_TTS_MODELS}) + model: str = Field( + default="bulbul:v2", json_schema_extra={"examples": SARVAM_TTS_MODELS} + ) voice: str = Field(default="anushka", json_schema_extra={"examples": SARVAM_VOICES}) - language: str = Field(default="hi-IN", json_schema_extra={"examples": SARVAM_LANGUAGES}) + language: str = Field( + default="hi-IN", json_schema_extra={"examples": SARVAM_LANGUAGES} + ) api_key: str @@ -372,8 +376,12 @@ SARVAM_STT_MODELS = ["saarika:v2.5", "saaras:v2"] @register_stt class SarvamSTTConfiguration(BaseSTTConfiguration): provider: Literal[ServiceProviders.SARVAM] = ServiceProviders.SARVAM - model: str = Field(default="saarika:v2.5", json_schema_extra={"examples": SARVAM_STT_MODELS}) - language: str = Field(default="hi-IN", json_schema_extra={"examples": SARVAM_LANGUAGES}) + model: str = Field( + default="saarika:v2.5", json_schema_extra={"examples": SARVAM_STT_MODELS} + ) + language: str = Field( + default="hi-IN", json_schema_extra={"examples": SARVAM_LANGUAGES} + ) api_key: str diff --git a/api/services/looptalk/core/pipeline_builder.py b/api/services/looptalk/core/pipeline_builder.py index b6c41a5..0de82fd 100644 --- a/api/services/looptalk/core/pipeline_builder.py +++ b/api/services/looptalk/core/pipeline_builder.py @@ -91,7 +91,6 @@ class LoopTalkPipelineBuilder: # Create engine first (needed for create_pipeline_components) engine = PipecatEngine( llm=llm, - tts=tts, workflow=workflow_graph, call_context_vars={}, workflow_run_id=None, # LoopTalk doesn't have workflow runs diff --git a/api/services/pipecat/run_pipeline.py b/api/services/pipecat/run_pipeline.py index c33d121..f2a966c 100644 --- a/api/services/pipecat/run_pipeline.py +++ b/api/services/pipecat/run_pipeline.py @@ -467,7 +467,6 @@ async def _run_pipeline( engine = PipecatEngine( llm=llm, - tts=tts, workflow=workflow_graph, call_context_vars=merged_call_context_vars, workflow_run_id=workflow_run_id, diff --git a/api/services/pipecat/service_factory.py b/api/services/pipecat/service_factory.py index c0c39e6..be55b5f 100644 --- a/api/services/pipecat/service_factory.py +++ b/api/services/pipecat/service_factory.py @@ -31,6 +31,9 @@ if TYPE_CHECKING: def create_stt_service(user_config): """Create and return appropriate STT service based on user configuration""" + logger.info( + f"Creating STT service: provider={user_config.stt.provider}, model={user_config.stt.model}" + ) if user_config.stt.provider == ServiceProviders.DEEPGRAM.value: # Use language from user config, defaulting to "multi" for multilingual support language = getattr(user_config.stt, "language", None) or "multi" @@ -110,6 +113,9 @@ def create_tts_service(user_config, audio_config: "AudioConfig"): user_config: User configuration containing TTS settings transport_type: Type of transport (e.g., 'stasis', 'twilio', 'webrtc') """ + logger.info( + f"Creating TTS service: provider={user_config.tts.provider}, model={user_config.tts.model}" + ) # Create function call filter to prevent TTS from speaking function call tags xml_function_tag_filter = XMLFunctionTagFilter() if user_config.tts.provider == ServiceProviders.DEEPGRAM.value: @@ -186,6 +192,9 @@ def create_tts_service(user_config, audio_config: "AudioConfig"): def create_llm_service(user_config): """Create and return appropriate LLM service based on user configuration""" model = user_config.llm.model + logger.info( + f"Creating LLM service: provider={user_config.llm.provider}, model={model}" + ) if user_config.llm.provider == ServiceProviders.OPENAI.value: if "gpt-5" in model: return OpenAILLMService( @@ -251,6 +260,6 @@ def create_voicemail_classification_llm(): return OpenAILLMService( api_key=api_key, - model="gpt-4o-mini", + model="gpt-4o", params=OpenAILLMService.InputParams(temperature=0.0), ) diff --git a/api/services/workflow/pipecat_engine.py b/api/services/workflow/pipecat_engine.py index a7db110..b8bd59f 100644 --- a/api/services/workflow/pipecat_engine.py +++ b/api/services/workflow/pipecat_engine.py @@ -1,4 +1,4 @@ -from typing import TYPE_CHECKING, Any, Awaitable, Callable, Optional, Union +from typing import TYPE_CHECKING, Awaitable, Callable, Optional, Union from api.services.workflow.disposition_mapper import ( apply_disposition_mapping, @@ -57,7 +57,6 @@ class PipecatEngine: task: Optional[PipelineTask] = None, llm: Optional["LLMService"] = None, context: Optional[LLMContext] = None, - tts: Optional[Any] = None, transport: Optional[BaseTransport] = None, workflow: WorkflowGraph, call_context_vars: dict, @@ -67,7 +66,6 @@ class PipecatEngine: self.task = task self.llm = llm self.context = context - self.tts = tts self.transport = transport self.workflow = workflow self._call_context_vars = call_context_vars diff --git a/api/services/workflow/pipecat_engine_callbacks.py b/api/services/workflow/pipecat_engine_callbacks.py index 434ba5b..6449026 100644 --- a/api/services/workflow/pipecat_engine_callbacks.py +++ b/api/services/workflow/pipecat_engine_callbacks.py @@ -75,7 +75,7 @@ def create_user_idle_callback(engine: "PipecatEngine"): message = { "role": "system", - "content": "The user has been quiet. We will be disconnecting the call now. Wish them a good day.", + "content": "The user has been quiet. We will be disconnecting the call now. Wish them a good day in the language that the user has been speaking so far.", } await user_idle.push_frame(LLMMessagesAppendFrame([message], run_llm=True)) await engine.send_end_task_frame(