Datasets
Import a window of request traces as dataset rows
POST
/
v1
/
datasets
/
{dataset_id}
/
import-traces
Import a window of request traces as dataset rows
curl --request POST \
--url https://api.veri.studio/v1/datasets/{dataset_id}/import-traces \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"deployment": "<string>",
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"model_version_id": "<string>",
"limit": 1,
"snapshot": true,
"force": true,
"scores": {
"evaluator": "<string>",
"evaluator_version": 123,
"passed": true,
"min": 123,
"max": 123,
"label": "<string>",
"min_confidence": 123,
"max_confidence": 123
},
"thread_id": "<string>",
"request_id": "<string>"
}
'import requests
url = "https://api.veri.studio/v1/datasets/{dataset_id}/import-traces"
payload = {
"deployment": "<string>",
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"model_version_id": "<string>",
"limit": 1,
"snapshot": True,
"force": True,
"scores": {
"evaluator": "<string>",
"evaluator_version": 123,
"passed": True,
"min": 123,
"max": 123,
"label": "<string>",
"min_confidence": 123,
"max_confidence": 123
},
"thread_id": "<string>",
"request_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
deployment: '<string>',
from: '2023-11-07T05:31:56Z',
to: '2023-11-07T05:31:56Z',
model_version_id: '<string>',
limit: 1,
snapshot: true,
force: true,
scores: {
evaluator: '<string>',
evaluator_version: 123,
passed: true,
min: 123,
max: 123,
label: '<string>',
min_confidence: 123,
max_confidence: 123
},
thread_id: '<string>',
request_id: '<string>'
})
};
fetch('https://api.veri.studio/v1/datasets/{dataset_id}/import-traces', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"object": "<string>",
"id": "<string>",
"dataset_id": "<string>",
"deployment_id": "<string>",
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"format": "prompt",
"traces_scanned": 123,
"rows_appended": 123,
"skipped": "<unknown>",
"head_row": 123,
"first_row": 123,
"last_row": 123,
"snapshot_id": "<string>"
}Authorizations
Body
application/json
Response
Import a window of request traces as dataset rows
curl --request POST \
--url https://api.veri.studio/v1/datasets/{dataset_id}/import-traces \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"deployment": "<string>",
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"model_version_id": "<string>",
"limit": 1,
"snapshot": true,
"force": true,
"scores": {
"evaluator": "<string>",
"evaluator_version": 123,
"passed": true,
"min": 123,
"max": 123,
"label": "<string>",
"min_confidence": 123,
"max_confidence": 123
},
"thread_id": "<string>",
"request_id": "<string>"
}
'import requests
url = "https://api.veri.studio/v1/datasets/{dataset_id}/import-traces"
payload = {
"deployment": "<string>",
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"model_version_id": "<string>",
"limit": 1,
"snapshot": True,
"force": True,
"scores": {
"evaluator": "<string>",
"evaluator_version": 123,
"passed": True,
"min": 123,
"max": 123,
"label": "<string>",
"min_confidence": 123,
"max_confidence": 123
},
"thread_id": "<string>",
"request_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
deployment: '<string>',
from: '2023-11-07T05:31:56Z',
to: '2023-11-07T05:31:56Z',
model_version_id: '<string>',
limit: 1,
snapshot: true,
force: true,
scores: {
evaluator: '<string>',
evaluator_version: 123,
passed: true,
min: 123,
max: 123,
label: '<string>',
min_confidence: 123,
max_confidence: 123
},
thread_id: '<string>',
request_id: '<string>'
})
};
fetch('https://api.veri.studio/v1/datasets/{dataset_id}/import-traces', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"object": "<string>",
"id": "<string>",
"dataset_id": "<string>",
"deployment_id": "<string>",
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"format": "prompt",
"traces_scanned": 123,
"rows_appended": 123,
"skipped": "<unknown>",
"head_row": 123,
"first_row": 123,
"last_row": 123,
"snapshot_id": "<string>"
}
