nemo_voice_agent.evaluation.tools.rtvi_control

View as Markdown

Module Contents

Classes

NameDescription
SendExitMessageToolSend an “Exit” message to indicate that the scenario is finished.
SendRTVIMessageToolSend a scenario finished message to the evaluator.
SendScenarioSummaryToolSend a “Scnario Summary” message after the user has no more requests

Data

EXIT_MESSAGE_END_TAG

EXIT_MESSAGE_START_TAG

FINAL_RESPONSE_END_TAG

FINAL_RESPONSE_START_TAG

API

class nemo_voice_agent.evaluation.tools.rtvi_control.SendExitMessageTool(
rtvi: pipecat.processors.frameworks.rtvi.RTVIProcessor,
description: typing.Optional[str] = None
)

Bases: SendRTVIMessageTool

Send an “Exit” message to indicate that the scenario is finished.

properties
Dict[str, Any]
required_properties
List[str]
nemo_voice_agent.evaluation.tools.rtvi_control.SendExitMessageTool._after_result(
params: pipecat.services.llm_service.FunctionCallParams
) -> None
async

Send the “Exit” message once the function-call result is delivered.

Order matters: ack the function call FIRST so pipecat dispatches FunctionCallResultFrame and the assistant aggregator commits both the assistant message (with tool_calls) and the tool reply before the bridge sees <exit>. If send_exit_message ran first, the bridge would race the commit cycle, snapshot the context mid-flight, and the captured llm_context.json would be missing the EndConversationTool entry. That ordering is why this lives in the post-delivery hook rather than in _execute.

nemo_voice_agent.evaluation.tools.rtvi_control.SendExitMessageTool._execute(
kwargs: typing.Any = {}
) -> typing.Any
async

Acknowledge the exit request. The “Exit” message itself is emitted from _after_result, i.e. after the result has been delivered.

Parameters:

kwargs
Any" default="{}

Any extra LLM-supplied arguments, ignored (this tool takes none).

Returns: Any

The tool result delivered by StandardSchemaTool.__call__.

nemo_voice_agent.evaluation.tools.rtvi_control.SendExitMessageTool.send_exit_message(
message: str = 'The task is finished.'
) -> None
async

Send an “Exit” message.

Parameters:

message
str" default="'The task is finished.'

The message to be sent.

class nemo_voice_agent.evaluation.tools.rtvi_control.SendRTVIMessageTool(
description: typing.Optional[str] = None,
rtvi: typing.Optional[pipecat.processors.frameworks.rtvi.RTVIProcessor] = None
)

Bases: StandardSchemaTool

Send a scenario finished message to the evaluator.

DESCRIPTION
str
properties
Dict[str, Any]

Return the properties for the tool.

required_properties
List[str]

Return the required properties for the tool.

nemo_voice_agent.evaluation.tools.rtvi_control.SendRTVIMessageTool._execute(
message: typing.Optional[str] = None,
kwargs: typing.Any = {}
) -> typing.Any
async

Send a message.

Parameters:

message
Optional[str]" default="None

The message to be sent.

kwargs
Any" default="{}

Any extra LLM-supplied arguments, ignored.

Returns: Any

The tool result delivered by StandardSchemaTool.__call__.

nemo_voice_agent.evaluation.tools.rtvi_control.SendRTVIMessageTool.send_rtvi_message(
message: str
) -> None
async

Send a message.

Parameters:

message
str

The message to be sent.

class nemo_voice_agent.evaluation.tools.rtvi_control.SendScenarioSummaryTool(
rtvi: typing.Optional[pipecat.processors.frameworks.rtvi.RTVIProcessor] = None,
description: typing.Optional[str] = None
)

Bases: SendRTVIMessageTool

Send a “Scnario Summary” message after the user has no more requests and the agent has answered all the user’s questions The input message should contain all required information in the required format.

nemo_voice_agent.evaluation.tools.rtvi_control.SendScenarioSummaryTool._execute(
message: typing.Optional[str] = None,
kwargs: typing.Any = {}
) -> typing.Any
async

Send a “Scnario Summary” message to the client, which should contain all required information for the evaluation.

Parameters:

message
Optional[str]" default="None

The summary message to be sent.

kwargs
Any" default="{}

Any extra LLM-supplied arguments, ignored.

Returns: Any

The tool result delivered by StandardSchemaTool.__call__.

nemo_voice_agent.evaluation.tools.rtvi_control.SendScenarioSummaryTool.send_scenario_summary(
message: str
) -> None
async

Send a “Scnario Summary” message.

Parameters:

message
str

The message to be sent.

nemo_voice_agent.evaluation.tools.rtvi_control.EXIT_MESSAGE_END_TAG = '</exit>'
nemo_voice_agent.evaluation.tools.rtvi_control.EXIT_MESSAGE_START_TAG = '<exit>'
nemo_voice_agent.evaluation.tools.rtvi_control.FINAL_RESPONSE_END_TAG = '</final_response>'
nemo_voice_agent.evaluation.tools.rtvi_control.FINAL_RESPONSE_START_TAG = '<final_response>'