logs

Update

Update a logged datapoint in your Humanloop project.

patch/logs/{id}

Request

  • Base URL: https://api.humanloop.com/v4
  • URL: https://api.humanloop.com/v4/logs/{id}
  • Auth: API key in header X-API-KEY

Path parameters

idstring required

String ID of logged datapoint to return. Starts with data_.

Request body

outputstring

Generated output from your model for the provided inputs.

errorstring

Error message if the log is an error.

durationnumber double

Duration of the logged event in seconds.

Response

Successful Response

projectstring

The name of the project associated with this log

project_idstring

The unique ID of the project associated with this log.

session_idstring

ID of the session to associate the datapoint.

session_reference_idstring

A unique string identifying the session to associate the datapoint to. Allows you to log multiple datapoints to a session (using an ID kept by your internal systems) by passing the same session_reference_id in subsequent log requests. Specify at most one of this or session_id.

parent_idstring

ID associated to the parent datapoint in a session.

parent_reference_idstring

A unique string identifying the previously-logged parent datapoint in a session. Allows you to log nested datapoints with your internal system IDs by passing the same reference ID as parent_id in a prior log request. Specify at most one of this or parent_id. Note that this cannot refer to a datapoint being logged in the same request.

inputsobject

The inputs passed to the prompt template.

sourcestring

Identifies where the model was called from.

metadataobject

Any additional metadata to record.

saveboolean

Whether the request/response payloads will be stored on Humanloop.

source_datapoint_idstring

ID of the source datapoint if this is a log derived from a datapoint in a dataset.

idstring required

String ID of logged datapoint. Starts with data_.

reference_idstring

Unique user-provided string identifying the datapoint.

outputstring

Generated output from your model for the provided inputs. Can be None if logging an error, or if logging a parent datapoint with the intention to populate it later

config_idstring

Unique ID of a config to associate to the log.

environmentstring

The environment name used to create the log.

created_atstring date-time

User defined timestamp for when the log was created.

errorstring

Error message if the log is an error.

stdoutstring

Captured log and debug statements.

durationnumber double

Duration of the logged event in seconds.

prompt_tokensinteger

Number of tokens in the prompt used to generate the output.

output_tokensinteger

Number of tokens in the output generated by the model.

prompt_costnumber double

Cost in dollars associated to the tokens in the prompt.

output_costnumber double

Cost in dollars associated to the tokens in the output.

provider_requestobject

Raw request sent to provider.

provider_responseobject

Raw response received the provider.

userstring

User email address provided when creating the datapoint.

provider_latencynumber double

Latency of provider response.

tokensinteger

Total number of tokens in the prompt and output.

raw_outputstring

Raw output from the provider.

finish_reasonstring

Reason the generation finished.

observability_status'pending' | 'running' | 'completed' | 'failed' required

Status of a Log for observability.

Observability is implemented by running monitoring Evaluators on Logs.

updated_atstring date-time required
batch_idsstring[]

List of batch IDs the log belongs to.

Changes

No recorded changes to this operation across all 1 revision of this API.