Python
import os
from scale_gp import SGPClient
client = SGPClient(
api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted
)
page = client.evaluation_datasets.autogenerated_draft_test_cases.list(
evaluation_dataset_id="evaluation_dataset_id",
)
page = page.items[0]
print(page.id)package main
import (
"context"
"fmt"
"github.com/stainless-sdks/sgp-go"
"github.com/stainless-sdks/sgp-go/option"
)
func main() {
client := sgp.NewClient(
option.WithAPIKey("My API Key"),
)
page, err := client.EvaluationDatasets.AutogeneratedDraftTestCases.List(
context.TODO(),
"evaluation_dataset_id",
sgp.EvaluationDatasetAutogeneratedDraftTestCaseListParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}curl --request GET \
--url https://api.egp.scale.com/v4/evaluation-datasets/{evaluation_dataset_id}/autogenerated-draft-test-casesconst options = {method: 'GET'};
fetch('https://api.egp.scale.com/v4/evaluation-datasets/{evaluation_dataset_id}/autogenerated-draft-test-cases', 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://api.egp.scale.com/v4/evaluation-datasets/{evaluation_dataset_id}/autogenerated-draft-test-cases",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://api.egp.scale.com/v4/evaluation-datasets/{evaluation_dataset_id}/autogenerated-draft-test-cases")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.egp.scale.com/v4/evaluation-datasets/{evaluation_dataset_id}/autogenerated-draft-test-cases")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"items": [
{
"evaluation_dataset_id": "<string>",
"test_case_data": {
"input": "<string>",
"artifact_ids_filter": [
"<string>"
],
"expected_output": "<string>",
"expected_extra_info": {
"chunks": [
{
"text": "<string>",
"metadata": {}
}
],
"schema_type": "CHUNKS"
}
},
"approved": true,
"content_metadata": {},
"id": "<string>",
"account_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"created_by_user_id": "<string>",
"topic_str": "<string>",
"missing_chunks": [
{
"chunk_text": "<string>",
"artifact_id": "<string>",
"artifact_name": "<string>",
"artifact_content_modification_identifier": "<string>"
}
]
}
],
"total_item_count": 123,
"current_page": 123,
"items_per_page": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Evaluation Datasets
List Autogenerated Draft Test Cases
GET
/
v4
/
evaluation-datasets
/
{evaluation_dataset_id}
/
autogenerated-draft-test-cases
Python
import os
from scale_gp import SGPClient
client = SGPClient(
api_key=os.environ.get("SGP_API_KEY"), # This is the default and can be omitted
)
page = client.evaluation_datasets.autogenerated_draft_test_cases.list(
evaluation_dataset_id="evaluation_dataset_id",
)
page = page.items[0]
print(page.id)package main
import (
"context"
"fmt"
"github.com/stainless-sdks/sgp-go"
"github.com/stainless-sdks/sgp-go/option"
)
func main() {
client := sgp.NewClient(
option.WithAPIKey("My API Key"),
)
page, err := client.EvaluationDatasets.AutogeneratedDraftTestCases.List(
context.TODO(),
"evaluation_dataset_id",
sgp.EvaluationDatasetAutogeneratedDraftTestCaseListParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}curl --request GET \
--url https://api.egp.scale.com/v4/evaluation-datasets/{evaluation_dataset_id}/autogenerated-draft-test-casesconst options = {method: 'GET'};
fetch('https://api.egp.scale.com/v4/evaluation-datasets/{evaluation_dataset_id}/autogenerated-draft-test-cases', 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://api.egp.scale.com/v4/evaluation-datasets/{evaluation_dataset_id}/autogenerated-draft-test-cases",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://api.egp.scale.com/v4/evaluation-datasets/{evaluation_dataset_id}/autogenerated-draft-test-cases")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.egp.scale.com/v4/evaluation-datasets/{evaluation_dataset_id}/autogenerated-draft-test-cases")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"items": [
{
"evaluation_dataset_id": "<string>",
"test_case_data": {
"input": "<string>",
"artifact_ids_filter": [
"<string>"
],
"expected_output": "<string>",
"expected_extra_info": {
"chunks": [
{
"text": "<string>",
"metadata": {}
}
],
"schema_type": "CHUNKS"
}
},
"approved": true,
"content_metadata": {},
"id": "<string>",
"account_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"created_by_user_id": "<string>",
"topic_str": "<string>",
"missing_chunks": [
{
"chunk_text": "<string>",
"artifact_id": "<string>",
"artifact_name": "<string>",
"artifact_content_modification_identifier": "<string>"
}
]
}
],
"total_item_count": 123,
"current_page": 123,
"items_per_page": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Path Parameters
Query Parameters
Check if test cases are based on missing chunks
Page number for pagination to be returned by the given endpoint. Starts at page 1
Required range:
x >= 1Maximum number of artifacts to be returned by the given endpoint. Defaults to 100 and cannot be greater than 10k.
Required range:
1 <= x <= 10000Response
Successful Response
The data returned for the current page.
Show child attributes
Show child attributes
The total number of items of the query
The current page number.
The number of items per page.
⌘I

