nemo_voice_agent.evaluation.tools.basic_tools

View as Markdown

Module Contents

Classes

NameDescription
EndConversationToolEnd the conversation with the user.
GetCityWeatherToolGet the weather of a city.
PlaceOrderToolPlace order tool.
ReadFileToolRead a file.
SaveQuestionAnswerToolSend an answer to the user.

API

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

Bases: SendExitMessageTool

End the conversation with the user.

class nemo_voice_agent.evaluation.tools.basic_tools.GetCityWeatherTool(
description: typing.Optional[str] = None
)

Bases: StandardSchemaTool

Get the weather of a city.

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.basic_tools.GetCityWeatherTool._execute(
city_name: typing.Optional[str] = None
) -> typing.Dict[str, typing.Any]
async

Get the weather of a city and return it.

class nemo_voice_agent.evaluation.tools.basic_tools.PlaceOrderTool(
rtvi: typing.Optional[pipecat.processors.frameworks.rtvi.RTVIProcessor] = None,
auto_validate: bool = False,
valid_item_names: typing.List[str] = None
)

Bases: SendScenarioSummaryTool

Place order tool.

properties
Dict[str, Any]
required_item_keys
= ['name', 'unit_price', 'quantity']
required_properties
List[str]
nemo_voice_agent.evaluation.tools.basic_tools.PlaceOrderTool._execute(
items: typing.Optional[typing.List[typing.Dict[str, typing.Any]]] = None,
customer_name: typing.Optional[str] = None,
customer_phone: typing.Optional[str] = None,
total_price: typing.Optional[float] = None
) -> typing.Dict[str, typing.Any]
async

Validate the order, emit the scenario summary, and return the placed-order result.

nemo_voice_agent.evaluation.tools.basic_tools.PlaceOrderTool._validate_item(
item: typing.Dict[str, typing.Any]
) -> None

Validate an item in the order.

Parameters:

item
Dict[str, Any]

The item to be validated.

class nemo_voice_agent.evaluation.tools.basic_tools.ReadFileTool()

Bases: StandardSchemaTool

Read a file.

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.basic_tools.ReadFileTool._execute(
file_path: typing.Optional[str] = None
) -> typing.Dict[str, typing.Any]
async

Read a file from the file system and return its content.

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

Bases: SendScenarioSummaryTool

Send an answer to the user.

properties
Dict[str, Any]
required_properties
List[str]
nemo_voice_agent.evaluation.tools.basic_tools.SaveQuestionAnswerTool._execute(
question: typing.Optional[str] = None,
answer: typing.Optional[str] = None
) -> typing.Dict[str, typing.Any]
async

Send the question/answer pair as a scenario summary and return the ack.