Complete API reference for the aitestagent TypeScript SDK.
The main testing function that evaluates any output using AI.
Parameters:
| Parameter | Type | Description |
|-----------|------|-------------|
| output | string | The output to evaluate |
output
string
| options.expected | string? | Expected output for accuracy comparison |
options.expected
string?
| options.criteria | string? | Custom criteria for evaluation |
options.criteria
| options.threshold | number? | Pass threshold 1-10 (default: 7.0) |
options.threshold
number?
| options.model | string? | LLM model to use |
options.model
Returns: Promise<TestResult>
Promise<TestResult>
Evaluate output against custom criteria.
---
The SDK also re-exports the underlying Judge from praisonai for advanced usage: