From cc2d3e70d25c45ef557eeb177904e36a86da3e92 Mon Sep 17 00:00:00 2001 From: Abhishek Kumar Date: Wed, 31 Dec 2025 22:02:50 +0530 Subject: [PATCH] chore: render initial and gathered context --- api/services/configuration/registry.py | 2 +- api/services/pipecat/service_factory.py | 7 ++- .../[workflowId]/run/[runId]/page.tsx | 47 +++++++++++++++++-- 3 files changed, 51 insertions(+), 5 deletions(-) diff --git a/api/services/configuration/registry.py b/api/services/configuration/registry.py index 6db0131..3b347ca 100644 --- a/api/services/configuration/registry.py +++ b/api/services/configuration/registry.py @@ -284,7 +284,7 @@ TTSConfig = Annotated[ ###################################################### STT ######################################################################## -DEEPGRAM_STT_MODELS = ["nova-3-general"] +DEEPGRAM_STT_MODELS = ["nova-2", "nova-3-general"] DEEPGRAM_LANGUAGES = [ "multi", "en", diff --git a/api/services/pipecat/service_factory.py b/api/services/pipecat/service_factory.py index 948fbdd..db19998 100644 --- a/api/services/pipecat/service_factory.py +++ b/api/services/pipecat/service_factory.py @@ -1,6 +1,7 @@ from typing import TYPE_CHECKING from fastapi import HTTPException +from loguru import logger from api.constants import MPS_API_URL from api.services.configuration.registry import ServiceProviders @@ -32,8 +33,12 @@ def create_stt_service(user_config): # Use language from user config, defaulting to "multi" for multilingual support language = getattr(user_config.stt, "language", None) or "multi" live_options = LiveOptions( - language=language, profanity_filter=False, endpointing=100 + language=language, + profanity_filter=False, + endpointing=100, + model=user_config.stt.model, ) + logger.debug(f"Using DeepGram Model - {user_config.stt.model}") return DeepgramSTTService( live_options=live_options, api_key=user_config.stt.api_key, diff --git a/ui/src/app/workflow/[workflowId]/run/[runId]/page.tsx b/ui/src/app/workflow/[workflowId]/run/[runId]/page.tsx index 0832e4e..6906429 100644 --- a/ui/src/app/workflow/[workflowId]/run/[runId]/page.tsx +++ b/ui/src/app/workflow/[workflowId]/run/[runId]/page.tsx @@ -1,6 +1,6 @@ 'use client'; -import { FileText, Video } from 'lucide-react'; +import { Check, Copy, FileText, Video } from 'lucide-react'; import Link from 'next/link'; import { useParams } from 'next/navigation'; import { useEffect, useRef, useState } from 'react'; @@ -25,6 +25,47 @@ interface WorkflowRunResponse { gathered_context: Record | null; } +function ContextDisplay({ title, context }: { title: string; context: Record | null }) { + const [copied, setCopied] = useState(false); + + const handleCopy = () => { + if (!context) return; + navigator.clipboard.writeText(JSON.stringify(context, null, 2)); + setCopied(true); + setTimeout(() => setCopied(false), 2000); + }; + + if (!context || Object.keys(context).length === 0) { + return ( + + + {title} + + +

No data available

+
+
+ ); + } + + return ( + + + {title} + + + +
+                    {JSON.stringify(context, null, 2)}
+                
+
+
+ ); +} + export default function WorkflowRunPage() { const params = useParams(); @@ -174,7 +215,7 @@ export default function WorkflowRunPage() { - {/*
+
-
*/} +
);