Set Labels
const url = 'https://example.com/v1/datasets/example/labels/example';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"task":{"id":"example","template":"","type":"yes_no","preset":"summarize","column":"answer","extraction_mode":"single","options":[],"fields":[],"reason":false,"models":["typesafe/jev-1.14"]},"labels":[{"row_id":1,"value":"example"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://example.com/v1/datasets/example/labels/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "task": { "id": "example", "template": "", "type": "yes_no", "preset": "summarize", "column": "answer", "extraction_mode": "single", "options": [], "fields": [], "reason": false, "models": [ "typesafe/jev-1.14" ] }, "labels": [ { "row_id": 1, "value": "example" } ] }'Set, change or clear labels people give, in a column named column: on any rows, at any
time, before or after models are asked. The first labels in a column come with the task they
answer, which makes them typed columns of data to compare models with. A batch is saved whole
or not at all.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
object
The prompt, e.g. “Is this review negative? {{review}}”.
Base name of the result columns. Defaults to one for the type.
Extraction editor: one scalar value or named, typed fields.
The choices for pick one and pick any; the levels, lowest first, for scale.
object
For extract: what to pull out. "amount:number" is short for {"name": "amount", "type": "number"}.
object
What to put in it, if the name doesn’t say.
Also write why, from LLMs, for classify and extract.
Decision models or LLMs; see GET /v1/models. Defaults to one for the type.
object
The label; null clears it. Yes/no takes true or false, pick one and scale an option’s name, pick any a list of names, write text, extract an object keyed by field name.
Responses
Section titled “Responses”Successful Response
Answers to one task from one model, or labels people set for one task.
object
The task’s column, e.g. fallacy.
The question its answers are to.
object
The prompt, e.g. “Is this review negative? {{review}}”.
Base name of the result columns. Defaults to one for the type.
Extraction editor: one scalar value or named, typed fields.
The choices for pick one and pick any; the levels, lowest first, for scale.
object
For extract: what to pull out. "amount:number" is short for {"name": "amount", "type": "number"}.
object
What to put in it, if the name doesn’t say.
Also write why, from LLMs, for classify and extract.
Decision models or LLMs; see GET /v1/models. Defaults to one for the type.
Its columns in data, e.g. fallacy__jev-1.14 and fallacy__jev-1.14_proba.
Rows with an answer.
USD runs spent on it; cached answers are free.
Example
{ "task": { "template": "", "type": "yes_no", "preset": "summarize", "column": "answer", "extraction_mode": "single", "options": [], "fields": [], "reason": false, "models": [ "typesafe/jev-1.14" ] }}Validation Error
object
object
object
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}