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
)
evaluation_dataset_generation_job = client.evaluation_datasets.generation_jobs.retrieve(
generation_job_id="generation_job_id",
evaluation_dataset_id="evaluation_dataset_id",
)
print(evaluation_dataset_generation_job.generation_job_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"),
)
evaluationDatasetGenerationJob, err := client.EvaluationDatasets.GenerationJobs.Get(
context.TODO(),
"evaluation_dataset_id",
"generation_job_id",
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", evaluationDatasetGenerationJob.GenerationJobID)
}
curl --request GET \
--url https://api.egp.scale.com/v4/evaluation-datasets/{evaluation_dataset_id}/generation-jobs/{generation_job_id}const options = {method: 'GET'};
fetch('https://api.egp.scale.com/v4/evaluation-datasets/{evaluation_dataset_id}/generation-jobs/{generation_job_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://api.egp.scale.com/v4/evaluation-datasets/{evaluation_dataset_id}/generation-jobs/{generation_job_id}",
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}/generation-jobs/{generation_job_id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.egp.scale.com/v4/evaluation-datasets/{evaluation_dataset_id}/generation-jobs/{generation_job_id}")
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{
"generation_job_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"num_test_cases": 123,
"num_completed_test_cases": 123,
"total_chunk_count": 123,
"failure_reason": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Evaluation Datasets
Get Evaluation Dataset Generation Job
GET
/
v4
/
evaluation-datasets
/
{evaluation_dataset_id}
/
generation-jobs
/
{generation_job_id}
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
)
evaluation_dataset_generation_job = client.evaluation_datasets.generation_jobs.retrieve(
generation_job_id="generation_job_id",
evaluation_dataset_id="evaluation_dataset_id",
)
print(evaluation_dataset_generation_job.generation_job_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"),
)
evaluationDatasetGenerationJob, err := client.EvaluationDatasets.GenerationJobs.Get(
context.TODO(),
"evaluation_dataset_id",
"generation_job_id",
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", evaluationDatasetGenerationJob.GenerationJobID)
}
curl --request GET \
--url https://api.egp.scale.com/v4/evaluation-datasets/{evaluation_dataset_id}/generation-jobs/{generation_job_id}const options = {method: 'GET'};
fetch('https://api.egp.scale.com/v4/evaluation-datasets/{evaluation_dataset_id}/generation-jobs/{generation_job_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://api.egp.scale.com/v4/evaluation-datasets/{evaluation_dataset_id}/generation-jobs/{generation_job_id}",
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}/generation-jobs/{generation_job_id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.egp.scale.com/v4/evaluation-datasets/{evaluation_dataset_id}/generation-jobs/{generation_job_id}")
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{
"generation_job_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"num_test_cases": 123,
"num_completed_test_cases": 123,
"total_chunk_count": 123,
"failure_reason": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Response
Successful Response
ID of the async job associated with this evaluation dataset generation
Status of the async job
Available options:
Pending, Running, Completed, Failed, Canceled The timestamp at which the upload job started.
The timestamp at which the upload job was last updated.
Optional number of test cases input to the job
Number of test cases that have been generated
Number of chunks in the knowledge base
Reason for the job's failure, if applicable
⌘I

