Get Validate Code Scorer Task Result
curl --request GET \
--url https://api.galileo.ai/v2/scorers/code/validate/{task_id} \
--header 'Galileo-API-Key: <api-key>'import requests
url = "https://api.galileo.ai/v2/scorers/code/validate/{task_id}"
headers = {"Galileo-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'Galileo-API-Key': '<api-key>'}};
fetch('https://api.galileo.ai/v2/scorers/code/validate/{task_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.galileo.ai/v2/scorers/code/validate/{task_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 => [
"Galileo-API-Key: <api-key>"
],
]);
$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://api.galileo.ai/v2/scorers/code/validate/{task_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Galileo-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.galileo.ai/v2/scorers/code/validate/{task_id}")
.header("Galileo-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.galileo.ai/v2/scorers/code/validate/{task_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Galileo-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"result": {
"result": {
"score_type": "<string>",
"scoreable_node_types": [],
"test_scores": [
{
"score": 123
}
],
"result_type": "valid",
"include_llm_credentials": false
}
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}data
Get Validate Code Scorer Task Result
Poll for a code-scorer validation task result (returns status/result).
The validation job creates an entry in registered_scorer_task_results (pending) and the runner
will PATCH the internal task-results endpoint when it finishes. This GET allows clients to poll
the current task result.
GET
/
v2
/
scorers
/
code
/
validate
/
{task_id}
Get Validate Code Scorer Task Result
curl --request GET \
--url https://api.galileo.ai/v2/scorers/code/validate/{task_id} \
--header 'Galileo-API-Key: <api-key>'import requests
url = "https://api.galileo.ai/v2/scorers/code/validate/{task_id}"
headers = {"Galileo-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'Galileo-API-Key': '<api-key>'}};
fetch('https://api.galileo.ai/v2/scorers/code/validate/{task_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.galileo.ai/v2/scorers/code/validate/{task_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 => [
"Galileo-API-Key: <api-key>"
],
]);
$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://api.galileo.ai/v2/scorers/code/validate/{task_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Galileo-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.galileo.ai/v2/scorers/code/validate/{task_id}")
.header("Galileo-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.galileo.ai/v2/scorers/code/validate/{task_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Galileo-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"result": {
"result": {
"score_type": "<string>",
"scoreable_node_types": [],
"test_scores": [
{
"score": 123
}
],
"result_type": "valid",
"include_llm_credentials": false
}
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
ClassicAPIKeyHeaderAPIKeyHeaderOAuth2PasswordBearerHTTPBasic
Path Parameters
Was this page helpful?
⌘I