nemo_voice_agent.evaluation.tools.tau2_retail_tools
nemo_voice_agent.evaluation.tools.tau2_retail_tools
Tau2-retail tool ports.
Same architecture as tau2_airline_tools.py: dict-form DB in self.state["db"],
_Tau2InvokeMixin for sync/async dual-routing, WriteScenarioTool subclass
records each mutation into self.state["actions"].
Module Contents
Classes
Functions
Data
TAU2_RETAIL_TOOL_NAME_TO_CLASS
API
Bases: _Tau2WriteTool
Emit <exit> only after the tool result has been delivered.
Ordering matters: pipecat must commit the tool-call record before the
bridge tears down the session on <exit>.
Provides sync invoke(**kwargs) + async _execute(**kwargs) routing.
Subclasses set PARAMS_MODEL = MyParams and implement _do_work(p).
Async entry — used by pipecat at live LLM call time.
Pure: returns the result; StandardSchemaTool.__call__ owns delivery
and applies the empty-result normalization centrally.
Synchronous entry — used by Tau2BaseScenario._gold_replay.
Bases: _Tau2InvokeMixin, WriteScenarioTool
Base for retail write tools (includes generic action-recording tools).
Find a variant by item_id across all products (mirrors tau2’s _get_item).
Mirror tau2: any status containing ‘pending’ counts as pending for some checks.