Skip to content
Get started

Update job

client.jobs.update(stringid, JobUpdateParams { agent, analyzer_model, backtest_results, 15 more } body?, RequestOptionsoptions?): JobUpdateResponse { id, created_at, iterations, 19 more }
PATCH/api/jobs/{id}/

Update job

ParametersExpand Collapse
id: string
formatuuid
body: JobUpdateParams { agent, analyzer_model, backtest_results, 15 more }
agent?: string | null
formatuuid
analyzer_model?: string
maxLength128
backtest_results?: unknown
baseline_score?: number | null
formatdouble
best_agent_code?: string
best_score?: number | null
formatdouble
candidates_per_iteration?: number
maximum9223372036854776000
minimum-9223372036854776000
formatint64
celery_task_id?: string
maxLength255
data_source?: string
minLength1
maxLength20
improvement?: number | null
formatdouble
job_type?: "inference" | "uploaded_outputs_setup" | "judge_scoring" | 2 more
  • inference - Inference
  • uploaded_outputs_setup - Uploaded Outputs Setup
  • judge_scoring - Judge Scoring
  • prompt_tuning - Prompt Tuning
  • model_backtesting - Model Backtesting
Accepts one of the following:
"inference"
"uploaded_outputs_setup"
"judge_scoring"
"prompt_tuning"
"model_backtesting"
num_iterations?: number
maximum9223372036854776000
minimum-9223372036854776000
formatint64
project?: string | null
formatuuid
prompt_slug?: string
maxLength255
report_markdown?: string
result?: unknown
status?: "pending" | "running" | "completed" | 2 more
  • pending - Pending
  • running - Running
  • completed - Completed
  • failed - Failed
  • cancelled - Cancelled
Accepts one of the following:
"pending"
"running"
"completed"
"failed"
"cancelled"
triggered_by?: number | null
ReturnsExpand Collapse
JobUpdateResponse { id, created_at, iterations, 19 more }
id: string
formatuuid
created_at: string
formatdate-time
iterations: Array<Iteration>
id: string
formatuuid
created_at: string
formatdate-time
iteration_name: string
maxLength64
job: string
formatuuid
agent_code?: string
avg_score?: number
formatdouble
description?: string
dimension_scores?: unknown
order?: number
maximum9223372036854776000
minimum-9223372036854776000
formatint64
status?: "keep" | "discard"
  • keep - Keep
  • discard - Discard
Accepts one of the following:
"keep"
"discard"
updated_at: string
formatdate-time
agent?: string | null
formatuuid
analyzer_model?: string
maxLength128
backtest_results?: unknown
baseline_score?: number | null
formatdouble
best_agent_code?: string
best_score?: number | null
formatdouble
candidates_per_iteration?: number
maximum9223372036854776000
minimum-9223372036854776000
formatint64
celery_task_id?: string
maxLength255
data_source?: string
maxLength20
improvement?: number | null
formatdouble
job_type?: "inference" | "uploaded_outputs_setup" | "judge_scoring" | 2 more
  • inference - Inference
  • uploaded_outputs_setup - Uploaded Outputs Setup
  • judge_scoring - Judge Scoring
  • prompt_tuning - Prompt Tuning
  • model_backtesting - Model Backtesting
Accepts one of the following:
"inference"
"uploaded_outputs_setup"
"judge_scoring"
"prompt_tuning"
"model_backtesting"
num_iterations?: number
maximum9223372036854776000
minimum-9223372036854776000
formatint64
project?: string | null
formatuuid
prompt_slug?: string
maxLength255
report_markdown?: string
result?: unknown
status?: "pending" | "running" | "completed" | 2 more
  • pending - Pending
  • running - Running
  • completed - Completed
  • failed - Failed
  • cancelled - Cancelled
Accepts one of the following:
"pending"
"running"
"completed"
"failed"
"cancelled"
triggered_by?: number | null
Update job
import OvermindLab from 'overmind-lab';

const client = new OvermindLab();

const job = await client.jobs.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');

console.log(job.id);
{
  "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  "created_at": "2019-12-27T18:11:19.117Z",
  "iterations": [
    {
      "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "created_at": "2019-12-27T18:11:19.117Z",
      "iteration_name": "iteration_name",
      "job": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "agent_code": "agent_code",
      "avg_score": 0,
      "description": "description",
      "dimension_scores": {},
      "order": -9007199254740991,
      "status": "keep"
    }
  ],
  "updated_at": "2019-12-27T18:11:19.117Z",
  "agent": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  "analyzer_model": "analyzer_model",
  "backtest_results": {},
  "baseline_score": 0,
  "best_agent_code": "best_agent_code",
  "best_score": 0,
  "candidates_per_iteration": -9007199254740991,
  "celery_task_id": "celery_task_id",
  "data_source": "data_source",
  "improvement": 0,
  "job_type": "inference",
  "num_iterations": -9007199254740991,
  "project": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  "prompt_slug": "prompt_slug",
  "report_markdown": "report_markdown",
  "result": {},
  "status": "pending",
  "triggered_by": 0
}
Returns Examples
{
  "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  "created_at": "2019-12-27T18:11:19.117Z",
  "iterations": [
    {
      "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "created_at": "2019-12-27T18:11:19.117Z",
      "iteration_name": "iteration_name",
      "job": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "agent_code": "agent_code",
      "avg_score": 0,
      "description": "description",
      "dimension_scores": {},
      "order": -9007199254740991,
      "status": "keep"
    }
  ],
  "updated_at": "2019-12-27T18:11:19.117Z",
  "agent": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  "analyzer_model": "analyzer_model",
  "backtest_results": {},
  "baseline_score": 0,
  "best_agent_code": "best_agent_code",
  "best_score": 0,
  "candidates_per_iteration": -9007199254740991,
  "celery_task_id": "celery_task_id",
  "data_source": "data_source",
  "improvement": 0,
  "job_type": "inference",
  "num_iterations": -9007199254740991,
  "project": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  "prompt_slug": "prompt_slug",
  "report_markdown": "report_markdown",
  "result": {},
  "status": "pending",
  "triggered_by": 0
}