examples

This endpoint allows clients to update existing examples in a specified dataset by sending a multipart/form-data PATCH request. Each form part contains either JSON-encoded data or binary attachment files to update an example.

patch/api/v1/platform/datasets/{dataset_id}/examples

Request

  • Base URL
    https://api.smith.langchain.com
  • URL
    https://api.smith.langchain.com/api/v1/platform/datasets/{dataset_id}/examples
  • Auth
    • API key in header X-API-Key
    • or API key in header X-Tenant-Id
    • or HTTP bearer

Path parameters

dataset_idstring uuid required

Dataset ID

Request body multipart/form-data

{example_id}string binary required

The Example update info as JSON. Can have fields 'metadata', 'split'

{example_id}.inputsstring binary

The updated Example inputs as JSON

{example_id}.outputsstring binary

The updated Example outputs as JSON

{example_id}.attachments_operationsstring binary

JSON describing attachment operations (retain, rename)

{example_id}.attachment.{name}string binary

New file attachment named {name}

Response

Created

as_ofstring
countinteger
example_idsstring[]

Example response

{
  "as_of": "2024-01-21T10:00:00.123456Z",
  "count": 1,
  "example_ids": [
    "[\"123e4567-e89b-12d3-a456-426614174000\"]"
  ]
}

Changes