langsmith.client.Client.batch_ingest_runs#

Client.batch_ingest_runs(create: Sequence[Run | RunLikeDict | Dict] | None = None, update: Sequence[Run | RunLikeDict | Dict] | None = None, *, pre_sampled: bool = False) None[source]#

Batch ingest/upsert multiple runs in the Langsmith system.

Parameters:
  • create (Optional[Sequence[Union[ls_schemas.Run, RunLikeDict]]]) – A sequence of Run objects or equivalent dictionaries representing runs to be created / posted.

  • update (Optional[Sequence[Union[ls_schemas.Run, RunLikeDict]]]) – A sequence of Run objects or equivalent dictionaries representing runs that have already been created and should be updated / patched.

  • pre_sampled (bool, optional) – Whether the runs have already been subject to sampling, and therefore should not be sampled again. Defaults to False.

Returns:

None

Raises:

LangsmithAPIError – If there is an error in the API request.

Return type:

None

Note

  • The run objects MUST contain the dotted_order and trace_id fields

    to be accepted by the API.