chore: minor fixes

This commit is contained in:
Abhishek Kumar 2026-01-13 14:55:48 +05:30
parent 514d9c5238
commit 1f3b3e2e3c
6 changed files with 25 additions and 12 deletions

View file

@ -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

View file

@ -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

View file

@ -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,

View file

@ -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),
)

View file

@ -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

View file

@ -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(