Skip to content

Commit 027585c

Browse files
committed
Fix voice-agent backend type
1 parent da4989a commit 027585c

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

llmstack/apps/runner/agent_controller.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import queue
66
import ssl
77
import threading
8-
from typing import Any, Dict, List, Literal, Optional, Union
8+
from typing import Any, Dict, List, Optional, Union
99

1010
import websockets
1111
from asgiref.sync import sync_to_async
@@ -370,7 +370,7 @@ def process(self, data: AgentControllerData):
370370
)
371371

372372
async def process_messages(self, data: AgentControllerData):
373-
if self._config.is_voice_agent and self._config.agent_config.backend.backend_type == Literal["multi_modal"]:
373+
if self._config.is_voice_agent and self._config.agent_config.backend.backend_type == "multi_modal":
374374
if not self._websocket:
375375
await self._init_websocket_connection()
376376

llmstack/apps/runner/app_coordinator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def __init__(
5555
}
5656

5757
# Add agent actor for output if it's an agent
58-
if self._is_agent:
58+
if self._is_agent or self._is_voice_agent:
5959
self.actors["output"] = AgentActor.start(
6060
coordinator_urn=self.actor_urn,
6161
dependencies=["_inputs0"] + list(self._actor_configs_map.keys()),

llmstack/apps/types/voice_agent.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class VoiceActivityDetectionSettings(BaseSchema):
6666

6767
class MultiModal(BaseSchema):
6868
backend_type: Literal["multi_modal"] = Field(
69-
default=Literal["multi_modal"],
69+
default="multi_modal",
7070
title="Backend Type",
7171
description="The backend type to use for the multi modal model.",
7272
json_schema_extra={"widget": "hidden", "readOnly": True},
@@ -113,7 +113,7 @@ class MultiModal(BaseSchema):
113113

114114
class CustomPipeline(BaseSchema):
115115
backend_type: Literal["custom_pipeline"] = Field(
116-
default=Literal["custom_pipeline"],
116+
default="custom_pipeline",
117117
title="Backend Type",
118118
description="The backend type to use for the custom pipeline.",
119119
json_schema_extra={"widget": "hidden", "readOnly": True},
@@ -190,7 +190,7 @@ class VoiceAgentConfigSchema(BaseSchema):
190190
ge=1,
191191
)
192192
backend: Union[MultiModal, CustomPipeline] = Field(
193-
default=None,
193+
default=MultiModal(),
194194
title="Backend",
195195
description="The backend to use for the voice agent.",
196196
)

0 commit comments

Comments
 (0)