Ler uma execução
curl --request GET \
--url https://{space}.{region}.api.niadra.com/v1/scenario-runs/{run_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://{space}.{region}.api.niadra.com/v1/scenario-runs/{run_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{space}.{region}.api.niadra.com/v1/scenario-runs/{run_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{space}.{region}.api.niadra.com/v1/scenario-runs/{run_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{space}.{region}.api.niadra.com/v1/scenario-runs/{run_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{space}.{region}.api.niadra.com/v1/scenario-runs/{run_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{space}.{region}.api.niadra.com/v1/scenario-runs/{run_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"build": {
"adapter": "<string>",
"pins": {
"assembler": "<string>",
"corpus_digest": "<string>",
"model": "<string>",
"niadra": {
"compiler": "<string>",
"pack_hash": "<string>"
},
"prompts": {},
"tool_schemas": {}
},
"sdk": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"mode": "hermetic_turn",
"run_id": "<string>",
"status": "pending",
"summary": {
"scenarios": [
{
"assertions": [
{
"baseline_failed": 123,
"baseline_passed": 123,
"drop": 123,
"failed": 123,
"flaky": true,
"id": "<string>",
"not_checked": 123,
"p_value": 123,
"passed": 123,
"regression": true
}
],
"completed": 123,
"infrastructure_errors": 123,
"needs_paraphrase": true,
"pin_mismatches": 123,
"scenario_id": "<string>",
"verdict": "pass",
"baseline_run_id": "<string>"
}
]
},
"vary": [
"prompts"
],
"verdict": "pass"
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"detail": "<string>",
"request_id": "<string>",
"type": "about:blank"
}Registro de turnos e replay
Ler uma execução
Uma execução com o veredito de cada cenário e a estatística de cada asserção.
GET
/
v1
/
scenario-runs
/
{run_id}
Ler uma execução
curl --request GET \
--url https://{space}.{region}.api.niadra.com/v1/scenario-runs/{run_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://{space}.{region}.api.niadra.com/v1/scenario-runs/{run_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{space}.{region}.api.niadra.com/v1/scenario-runs/{run_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{space}.{region}.api.niadra.com/v1/scenario-runs/{run_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{space}.{region}.api.niadra.com/v1/scenario-runs/{run_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{space}.{region}.api.niadra.com/v1/scenario-runs/{run_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{space}.{region}.api.niadra.com/v1/scenario-runs/{run_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"build": {
"adapter": "<string>",
"pins": {
"assembler": "<string>",
"corpus_digest": "<string>",
"model": "<string>",
"niadra": {
"compiler": "<string>",
"pack_hash": "<string>"
},
"prompts": {},
"tool_schemas": {}
},
"sdk": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"mode": "hermetic_turn",
"run_id": "<string>",
"status": "pending",
"summary": {
"scenarios": [
{
"assertions": [
{
"baseline_failed": 123,
"baseline_passed": 123,
"drop": 123,
"failed": 123,
"flaky": true,
"id": "<string>",
"not_checked": 123,
"p_value": 123,
"passed": 123,
"regression": true
}
],
"completed": 123,
"infrastructure_errors": 123,
"needs_paraphrase": true,
"pin_mismatches": 123,
"scenario_id": "<string>",
"verdict": "pass",
"baseline_run_id": "<string>"
}
]
},
"vary": [
"prompts"
],
"verdict": "pass"
}{
"code": "<string>",
"status": 123,
"title": "<string>",
"detail": "<string>",
"request_id": "<string>",
"type": "about:blank"
}Autorizações
sourceKeypersonToken
nia_sk_...
Parâmetros de caminho
Resposta
A execução.
Show child attributes
Show child attributes
Opções disponíveis:
hermetic_turn, hermetic_conversation, era_memory Required string length:
1 - 512Opções disponíveis:
pending, done Show child attributes
Show child attributes
Opções disponíveis:
prompts, corpus_digest, model, assembler, tool_schemas O pior dos vereditos dos cenários.
Opções disponíveis:
pass, flaky, infrastructure_error, pin_mismatch, regression 
