PUT
/
tasks
Authorization
Body
curl --request PUT \
  --url https://api.honeyhive.ai/tasks \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '{
  "datasets": [
    {
      "bytes": 123,
      "created_at": "2023-11-07T05:31:56Z",
      "description": "<string>",
      "file": [],
      "id": "<string>",
      "name": "<string>",
      "prompt": "<string>",
      "purpose": "<string>",
      "task": "<string>",
      "tenant": "<string>",
      "updated_at": "2023-11-07T05:31:56Z"
    }
  ],
  "fine_tuned_models": [
    {
      "created_at": "2023-11-07T05:31:56Z",
      "fine_tuned_model": "<string>",
      "hyperparams": "<string>",
      "id": "<string>",
      "model": "<string>",
      "object": "<string>",
      "org_id": "<string>",
      "result_files": "<string>",
      "status": "<string>",
      "training_files": "<string>",
      "updated_at": "2023-11-07T05:31:56Z",
      "validation_files": "<string>"
    }
  ],
  "metrics": [
    {
      "code_snippet": "<string>",
      "criteria": "<string>",
      "description": "<string>",
      "enabled_in_prod": true,
      "id": "<string>",
      "name": "<string>",
      "needs_ground_truth": true,
      "pass_when": true,
      "prompt": "<string>",
      "return_type": "<string>",
      "task": "<string>",
      "threshold": {},
      "updated_at": "2023-11-07T05:31:56Z"
    }
  ],
  "name": "<string>",
  "prompts": [
    {
      "created_at": "2023-11-07T05:31:56Z",
      "few_shot_examples": [],
      "hyperparameters": {},
      "input_variables": [],
      "is_deployed": true,
      "model": "<string>",
      "name": "<string>",
      "task": "<string>",
      "text": "<string>",
      "updated_at": "2023-11-07T05:31:56Z",
      "version": "<string>"
    }
  ],
  "task_id": "<string>",
  "type": "<string>"
}'
{
  "acknowledged": true,
  "matchedCount": 123,
  "modifiedCount": 123,
  "upsertedCount": 123,
  "upsertedId": "<string>"
}

Authorizations

Authorization
string
headerrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
datasets
object[]

The new datasets for the task

fine_tuned_models
object[]

The new fine-tuned models for the task

metrics
object[]

The new metrics for the task

name
string

The new name of the task

prompts
object[]

The new prompts for the task

task_id
string

The id of the task being updated

type
string

The new type of the task

Response

200 - application/json
acknowledged
boolean

Boolean flag representing if the update operation was successful

matchedCount
integer

Number of modified tasks

modifiedCount
integer

Number of modified tasks

upsertedCount
integer

Number of upserted tasks

upsertedId
string | null

The upserted ID of the task, if id has been changed