import SGPClient from 'sgp';
const client = new SGPClient({
apiKey: 'My API Key',
});
const evaluation = await client.evaluations.update('evaluation_id');
console.log(evaluation.id);
{
"name": "<string>",
"description": "<string>",
"status": "PENDING",
"application_spec_id": "<string>",
"application_variant_id": "<string>",
"tags": {},
"evaluation_config": {},
"evaluation_config_id": "<string>",
"completed_at": "2023-11-07T05:31:56Z",
"total_test_case_result_count": 123,
"completed_test_case_result_count": 123,
"annotation_config": {
"annotation_config_type": "generation",
"components": [
[
{
"optional": true,
"data_loc": [
"<string>"
],
"label": "<string>"
}
]
],
"direction": "col",
"llm_prompt": {
"variables": [
{
"name": "<string>",
"optional": true,
"data_loc": [
"<string>"
]
}
],
"template": "<string>"
}
},
"question_id_to_annotation_config": {},
"metric_config": {
"components": [
{
"type": "rouge",
"name": "<string>",
"mappings": {},
"params": {}
}
]
},
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"account_id": "<string>",
"created_by_user_id": "<string>",
"created_by_identity_type": "user",
"archived_at": "2023-11-07T05:31:56Z"
}
Updates a evaluation
This API can be used to update the evaluation that matches the ID that was passed in as a path parameter. To use this API, pass in the id
that was returned from your Create Evaluation API call as a path parameter.
Review the request schema to see the fields that can be updated.
import SGPClient from 'sgp';
const client = new SGPClient({
apiKey: 'My API Key',
});
const evaluation = await client.evaluations.update('evaluation_id');
console.log(evaluation.id);
{
"name": "<string>",
"description": "<string>",
"status": "PENDING",
"application_spec_id": "<string>",
"application_variant_id": "<string>",
"tags": {},
"evaluation_config": {},
"evaluation_config_id": "<string>",
"completed_at": "2023-11-07T05:31:56Z",
"total_test_case_result_count": 123,
"completed_test_case_result_count": 123,
"annotation_config": {
"annotation_config_type": "generation",
"components": [
[
{
"optional": true,
"data_loc": [
"<string>"
],
"label": "<string>"
}
]
],
"direction": "col",
"llm_prompt": {
"variables": [
{
"name": "<string>",
"optional": true,
"data_loc": [
"<string>"
]
}
],
"template": "<string>"
}
},
"question_id_to_annotation_config": {},
"metric_config": {
"components": [
{
"type": "rouge",
"name": "<string>",
"mappings": {},
"params": {}
}
]
},
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"account_id": "<string>",
"created_by_user_id": "<string>",
"created_by_identity_type": "user",
"archived_at": "2023-11-07T05:31:56Z"
}
Successful Response
The response is of type object
.