Datasets
Choisissez votre langage :
Datasets provide scenarios used to evaluate a system.
client.datasets.generate(systemId, options)
Start asynchronous dataset generation for a system.
| SDK | client.datasets.generate(system_id, options=None, idempotency_key=None) |
|---|---|
| Retourne | JobRef |
Parameters:
| Emplacement | Paramètre | Type | Requis | Défaut | Description |
|---|---|---|---|---|---|
| Path | system_id | string | Requis | — | System UUID. |
| Body | scenario_count | integer | Optionnel | 10 | Number of scenarios to generate. Minimum 1, maximum 500. |
| Body | user_dataset_path | string | Optionnel | — | Optional path/reference to a user-provided dataset source. |
| SDK option | idempotency_key | string | Optionnel | — | Sent as the Idempotency-Key header. |
client.datasets.import(...)
Import dataset scenarios directly. Python uses import_ because import is a reserved keyword.
| SDK | client.datasets.import_(system_id, scenarios, config=None) |
|---|---|
| Retourne | Dataset |
Parameters:
| Emplacement | Paramètre | Type | Requis | Description |
|---|---|---|---|---|
| Path | system_id | string | Requis | System UUID. |
| Body | scenarios | list[dict] | Requis | At least one scenario. Each scenario requires input. |
| Body | config | dict | Optionnel | Dataset-level metadata/configuration. |
Dataset scenario fields:
| Field | Type | Required | Description |
|---|---|---|---|
input | string or object | yes | Prompt/input sent to the system. |
expected_outputs | string[] | no | Expected response hints or labels. |
source | string | no | Scenario source. |
test_category | string | no | Scenario category. |
tested_aspect | string | no | Aspect being tested. |
client.datasets.get(systemId)
Read the current dataset for a system.
| SDK | client.datasets.get(system_id) |
|---|---|
| Retourne | Dataset | null |
Parameters:
| Emplacement | Paramètre | Type | Requis | Description |
|---|---|---|---|---|
| Path | system_id | string | Requis | System UUID. |
client.datasets.update(systemId, patch)
Patch the dataset scenarios and/or dataset config.
| SDK | client.datasets.update(system_id, patch) |
|---|---|
| Retourne | Dataset |
Parameters:
| Emplacement | Paramètre | Type | Requis | Description |
|---|---|---|---|---|
| Path | system_id | string | Requis | System UUID. |
| Body | scenarios | list[dict] | Optionnel | Replacement scenario list. |
| Body | config | dict | Optionnel | Dataset config patch. |
If scenarios is omitted and config is provided, the backend merges config into the existing dataset metadata config.
client.datasets.validate(systemId)
Validate the current dataset for a system.
| SDK | client.datasets.validate(system_id) |
|---|---|
| Retourne | Dataset |
Parameters:
| Emplacement | Paramètre | Type | Requis | Description |
|---|---|---|---|---|
| Path | system_id | string | Requis | System UUID. |
Cette page vous a été utile ?