Trillet AI logo

Test a receptionist

Trillet Partner API: Calls an existing receptionist with test callers and judges each call.

POSThttps://api.trillet.ai/partner/v1/tenants/{tenantId}/receptionist/test-runs

Calls the receptionist's front door with about ten made-up test callers, the same way its build did, and judges each call. Use it after changing a prompt, the knowledge base or the hours. A test run reports only: it fixes nothing and does not change the receptionist's status. The result is on the job, the full report at GET /jobs/{jobId}/test-report, and the latest run on the receptionist as lastTestRun. The test calls are not billed. Needs resources:write.

Loading code example
Loading code example

Authorizations

Authorizationstringheaderrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

tenantIdstringrequired

The tenant ID.

Pattern: ^[a-fA-F0-9]{24}$

Header Parameters

Idempotency-Keystring

Optional. Works as on the endpoints that require it.

Length: >= 1, <= 255

Body

passRatenumber

The pass mark for meetsPassRate. Defaults to the one the receptionist was built with.

Required range: x >= 0, x <= 1

Response

application/json

The test_run job, queued.

objectstringrequired
idstringrequired
Pattern: ^[a-fA-F0-9]{24}$
type"provision" | "test_run"required

provision: building a receptionist. test_run: testing one that exists.

Allowed values: "provision" | "test_run"
status"queued" | "running" | "succeeded" | "failed" | "cancelled"required
Allowed values: "queued" | "running" | "succeeded" | "failed" | "cancelled"
stage"reading" | "building" | "testing" | "finishing" | null

Where a running job is. null otherwise.

Allowed values: "reading" | "building" | "testing" | "finishing" | null
cancelRequestedboolean

A running job you cancelled. It stops at the next point it can.

tenantIdstring | null
attemptsinteger
resultobject | null

Set when a job succeeds. A provisioning job has receptionistStatus, reviewReason, frontDoorAgentId, agents and tests. A test run has total, passed, passRate, requiredPassRate and meetsPassRate.

result.receptionistStatus"ready" | "needs_review"
Allowed values: "ready" | "needs_review"
result.reviewReason"tests_failed" | "tests_unavailable" | "approval_required" | null
Allowed values: "tests_failed" | "tests_unavailable" | "approval_required" | null
result.frontDoorAgentIdstring
result.agentsarray<object>
result.testsobject
result.totalinteger

Test run. Calls that connected and were judged.

result.passedinteger

Test run.

result.passRatenumber

Test run.

result.requiredPassRatenumber

Test run.

result.meetsPassRateboolean

Test run.

errorobject | null
error.codestring
error.messagestring
createdAtstring | null<date-time>
startedAtstring | null<date-time>
finishedAtstring | null<date-time>

Last updated on