nemo_voice_agent.evaluation.tools.tau2_telecom_params
nemo_voice_agent.evaluation.tools.tau2_telecom_params
Pydantic parameter models for tau2_telecom DB shapes.
Used primarily by scripts/prepare_tau2_data/prepare_telecom.py to
round-trip the upstream TOML files through Pydantic — this materializes
default field values (e.g. UserSurroundings.signal_strength per-network
defaults, MockPhoneAttributes field defaults) that aren’t present in
the raw TOML. After round-trip the converted JSON is shape-complete and
downstream predicate / init function code can read fields via dict access
without defensive .get(..., default) everywhere.
Per-tool *Params argument-schema classes are added incrementally as each
LLM-callable tool is ported (same pattern as tau2_airline_params.py /
tau2_retail_params.py).
Module Contents
Classes
Functions
Data
API
Bases: enum.Enum
Bases: BaseModelNoExtra
Access Point Name configuration.
Bases: enum.Enum
Bases: BaseModel
Mirror of upstream tau2.utils.pydantic_utils.BaseModelNoExtra.
Forbids extra fields on input — catches typos in upstream data and in init/predicate function arguments at validation time.
Bases: BaseModelNoExtra
Bases: enum.Enum
Bases: _NoArgsParams
No arguments.
Bases: _NoArgsParams
No arguments.
Bases: _NoArgsParams
No arguments.
Bases: _NoArgsParams
No arguments.
Bases: _NoArgsParams
No arguments.
Bases: _NoArgsParams
No arguments.
Bases: _NoArgsParams
No arguments.
Bases: _NoArgsParams
No arguments.
Bases: _NoArgsParams
No arguments. Returns the formatted phone-status-bar string.
Bases: _NoArgsParams
No arguments.
Bases: _NoArgsParams
No arguments.
Bases: _NoArgsParams
No arguments.
Bases: _NoArgsParams
No arguments.
Bases: BaseModelNoExtra
Bases: BaseModelNoExtra
Bases: enum.Enum
Bases: _NoArgsParams
No arguments.
Bases: BaseModelNoExtra
List a customer’s bills, most-recent-first, optionally limited.
Bases: BaseModelNoExtra
Find customer records by full name + date of birth (YYYY-MM-DD).
dob is required for name-based lookup — disambiguates customers
with the same name (upstream policy: name alone cannot identify;
DOB confirms identity).
Bases: BaseModelNoExtra
Get current cycle data usage + plan limit + refueling amount for a line.
Bases: BaseModelNoExtra
Get details for any object by its ID (Customer C, Line L,
Device D, Bill B, or Plan P).
Bases: BaseModelNoExtra
Grant a specific permission to a specific app.
permission is one of the lowercase keys on AppPermissions
(storage, camera, microphone, location, contacts,
sms, phone). Unknown keys are rejected at execution time.
Bases: BaseModelNoExtra
Bases: enum.Enum
Bases: _NoArgsParams
No arguments. Pays the most recent pending payment request from the agent.
Bases: BaseModelNoExtra
State attributes of the mock phone device on the user side.
Bases: enum.Enum
Bases: enum.Enum
Bases: enum.Enum
Bases: enum.Enum
Bases: BaseModelNoExtra
Payment request initiated by the agent that the user can pay.
Bases: enum.Enum
Bases: _NoArgsParams
No arguments.
Bases: BaseModelNoExtra
Refuel a line with additional data (positive GB amount). Adds a one-time charge to the customer’s next bill at the plan’s refueling rate.
Bases: _NoArgsParams
No arguments.
Bases: _NoArgsParams
No arguments.
Bases: _NoArgsParams
No arguments. Returns the simulated mobile-data download speed.
Bases: BaseModelNoExtra
Send a payment request to the customer for a specific bill.
Sets the bill to AWAITING_PAYMENT. Fails if another bill is already awaiting payment for this customer (one open request at a time).
Bases: BaseModelNoExtra
Sets the active APN settings to a new APNSettings dict.
Upstream accepts Union[APNSettings, dict]. Voice mode receives
dict shape only.
Bases: BaseModelNoExtra
Sets the preferred cellular network mode (5G, 4G, 3G, 2G).
mode is the string value of a NetworkModePreference enum
(e.g. "4g_5g_preferred", "4g_only", "3g_only",
"2g_only"). Invalid values are rejected by the tool with a
failure message instead of a Pydantic ValidationError, so the
schema accepts a plain str — matches upstream’s permissive
signature.
Bases: enum.Enum
Bases: enum.Enum
Bases: BaseModelNoExtra
Information displayed in the phone’s status bar.
Upstream uses this as a derived view in check_status_bar; we don’t
consume it from the runtime DB (predicate code reads device fields
directly). Kept for parity in case a future ported tool needs it.
Bases: BaseModelNoExtra
Suspend an Active line; records suspension start date + reason.
Bases: BaseModelNoExtra
Database interface for the telecom domain (agent-facing).
Round-trip target for scripts/prepare_tau2_data/prepare_telecom.py’s
db.toml → db.json conversion. Materializes default fields on
nested types (e.g. Bill.line_items=[]).
Bases: BaseModelNoExtra
Database interface for the telecom domain (user-facing).
Round-trip target for scripts/prepare_tau2_data/prepare_telecom.py’s
user_db.toml → user_db.json conversion. Critical to materialize
the default surroundings block so predicate / init functions can
read its fields without dict-key-missing errors.
Bases: _NoArgsParams
No arguments. Toggles Airplane Mode on the device.
Bases: _NoArgsParams
No arguments. Toggles the mobile-data master switch on the device.
Bases: _NoArgsParams
No arguments.
Bases: _NoArgsParams
No arguments.
Bases: _NoArgsParams
No arguments.
Bases: _NoArgsParams
No arguments.
Bases: BaseModelNoExtra
Physical surroundings of the user (per-task; populated by init actions).
Per-task user state — name, phone number, location, signal-strength
table at the user’s current location, etc. Upstream’s user_db.toml
only carries the device defaults; surroundings is populated
per-task by initialization_actions like set_user_info and
set_user_location. The Pydantic round-trip in
prepare_telecom.py materializes the default surroundings block
(with name=None, phone_number=None, is_abroad=False, etc.) so init
functions can mutate fields without needing defensive .setdefault().
Bases: BaseModelNoExtra
Details about the VPN connection if active.
Bases: BaseModelNoExtra
Shared no-arguments schema used by every parameter-less telecom tool.
Rewrite a 10-digit US phone number in the fixture’s 555-123-4567 form.
db.json stores every phone number with dashes, and the lookups compare
strings exactly. Speech recognition and the agent render the same number in
other ways (“5551232002”, “555 123 2002”, “(555) 123-2002”, “+1 555 123 2002”),
and a dropped spoken “dash” is common, so get_customer_by_phone used to
fail on the right number. Separators are ignored: a value with exactly 10 ASCII
digits, or 11 starting with the US country code 1, is rewritten. Anything else
is returned unchanged so the lookup still fails loudly: a digit missing or
extra, a letter (including an extension such as “x12”), a non-ASCII digit, or a
”+” followed by any country code other than 1. Upstream tau2-bench’s current
main likewise matches phone numbers on their digits.
Mirror of the helper in tau2_retail_params.py — uniform shape for
Pydantic validation errors raised inside _Tau2InvokeMixin.invoke().