Skip to content

Commit 9ae8eb8

Browse files
committed
Tool config for both agent and voice-agent
1 parent c1fcb15 commit 9ae8eb8

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

llmstack/apps/runner/app_coordinator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def input(self, request_id: str, data: Dict):
137137
self.tell_actor("_inputs0", message)
138138

139139
# Also start actors that have no dependencies and send a BEGIN message when not an agent
140-
if not self._is_agent:
140+
if not self._is_agent and not self._is_voice_agent:
141141
for actor_config in self._actor_configs_map.values():
142142
if not self._actor_dependencies[actor_config.name]:
143143
actor_id = actor_config.name

llmstack/apps/runner/app_runner.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ async def _preprocess_input_files(
330330
return input_data
331331

332332
def _get_actor_configs_from_processors(
333-
self, processors: List[Dict], session_id: str, is_agent: bool, vendor_env: Dict = {}
333+
self, processors: List[Dict], session_id: str, is_agent_or_voice_agent: bool, vendor_env: Dict = {}
334334
):
335335
actor_configs = []
336336
allowed_processor_variables = [p["id"] for p in processors] + ["_inputs0"]
@@ -357,8 +357,10 @@ def _get_actor_configs_from_processors(
357357
"request_user": self._source.request_user,
358358
"app_uuid": self._source.id,
359359
"input_fields": processor.get("input_fields", []),
360-
"is_tool": is_agent,
361-
"output_template": processor.get("output_template", {"markdown": ""}) if is_agent else None,
360+
"is_tool": is_agent_or_voice_agent,
361+
"output_template": (
362+
processor.get("output_template", {"markdown": ""}) if is_agent_or_voice_agent else None
363+
),
362364
},
363365
dependencies=self._compute_dependencies_from_processor(processor, allowed_processor_variables),
364366
tool_schema=(
@@ -370,7 +372,7 @@ def _get_actor_configs_from_processors(
370372
"parameters": processor_cls.get_tool_input_schema(processor),
371373
},
372374
}
373-
if is_agent
375+
if is_agent_or_voice_agent
374376
else None
375377
),
376378
),
@@ -407,7 +409,7 @@ def __init__(
407409
self._bookkeeping_queue = asyncio.Queue()
408410

409411
actor_configs = self._get_actor_configs_from_processors(
410-
app_data.get("processors", []), self._session_id, self._is_agent, vendor_env
412+
app_data.get("processors", []), self._session_id, (self._is_agent or self._is_voice_agent), vendor_env
411413
)
412414
output_template = app_data.get("output_template", {}).get("markdown", "")
413415

0 commit comments

Comments
 (0)