Prompt tuning
Get prompt-tuning job
deprecated
Get a prompt-tuning job, including its tested result when complete.
GET
/
v1
/
prompt-tuning
/
jobs
/
{job_id}
Get prompt-tuning job
curl --request GET \
--url https://api.sqwish.ai/v1/prompt-tuning/jobs/{job_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sqwish.ai/v1/prompt-tuning/jobs/{job_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sqwish.ai/v1/prompt-tuning/jobs/{job_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"object": "prompt_tuning.job",
"status": "queued",
"dataset_id": "<string>",
"model": "<string>",
"decision": "<string>",
"effort": "standard",
"price_usd": "<string>",
"charge": "free",
"test_looks": 123,
"progress": {
"phase": "<string>",
"round": 123,
"rounds": 123,
"original_loss": 123,
"best_loss": 123
},
"result": {
"verdict": "improved",
"tuned": {
"id": "<string>",
"question": "<string>",
"kind": "single",
"outcomes": "<unknown>",
"rubric": [
"<unknown>"
],
"policy": {
"action_costs": {},
"abstain_below": 0.5
}
},
"candidate": {
"id": "<string>",
"question": "<string>",
"kind": "single",
"outcomes": "<unknown>",
"rubric": [
"<unknown>"
],
"policy": {
"action_costs": {},
"abstain_below": 0.5
}
},
"changes": [
{
"part": "<string>",
"before": "<string>",
"after": "<string>"
}
],
"label_issues": [
{
"row": "<string>",
"reason": "<string>"
}
],
"original": {
"id": "<string>",
"question": "<string>",
"kind": "single",
"outcomes": "<unknown>",
"rubric": [
"<unknown>"
],
"policy": {
"action_costs": {},
"abstain_below": 0.5
}
},
"decision": "<string>",
"rows": 123,
"rows_left_out": 123,
"noise_band": 123,
"rounds": [
{
"round": 123,
"best_loss": 123
}
],
"reasons": [
"<string>"
],
"test": {}
},
"created_at": 123,
"updated_at": 123,
"error": "<string>",
"label_issues_dismissed_at": 123
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": [
{
"path": [
"<string>"
],
"message": "<string>",
"type": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": [
{
"path": [
"<string>"
],
"message": "<string>",
"type": "<string>"
}
]
}
}Response
Successful Response
Get prompt-tuning job
curl --request GET \
--url https://api.sqwish.ai/v1/prompt-tuning/jobs/{job_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sqwish.ai/v1/prompt-tuning/jobs/{job_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sqwish.ai/v1/prompt-tuning/jobs/{job_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"object": "prompt_tuning.job",
"status": "queued",
"dataset_id": "<string>",
"model": "<string>",
"decision": "<string>",
"effort": "standard",
"price_usd": "<string>",
"charge": "free",
"test_looks": 123,
"progress": {
"phase": "<string>",
"round": 123,
"rounds": 123,
"original_loss": 123,
"best_loss": 123
},
"result": {
"verdict": "improved",
"tuned": {
"id": "<string>",
"question": "<string>",
"kind": "single",
"outcomes": "<unknown>",
"rubric": [
"<unknown>"
],
"policy": {
"action_costs": {},
"abstain_below": 0.5
}
},
"candidate": {
"id": "<string>",
"question": "<string>",
"kind": "single",
"outcomes": "<unknown>",
"rubric": [
"<unknown>"
],
"policy": {
"action_costs": {},
"abstain_below": 0.5
}
},
"changes": [
{
"part": "<string>",
"before": "<string>",
"after": "<string>"
}
],
"label_issues": [
{
"row": "<string>",
"reason": "<string>"
}
],
"original": {
"id": "<string>",
"question": "<string>",
"kind": "single",
"outcomes": "<unknown>",
"rubric": [
"<unknown>"
],
"policy": {
"action_costs": {},
"abstain_below": 0.5
}
},
"decision": "<string>",
"rows": 123,
"rows_left_out": 123,
"noise_band": 123,
"rounds": [
{
"round": 123,
"best_loss": 123
}
],
"reasons": [
"<string>"
],
"test": {}
},
"created_at": 123,
"updated_at": 123,
"error": "<string>",
"label_issues_dismissed_at": 123
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": [
{
"path": [
"<string>"
],
"message": "<string>",
"type": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": [
{
"path": [
"<string>"
],
"message": "<string>",
"type": "<string>"
}
]
}
}