Upsert Evaluator

Create an Evaluator or update it with a new version if it already exists.

Evaluators are identified by the ID or their path. The spec provided determines the version of the Evaluator.

You can provide version_name and version_description to identify and describe your versions. Version names must be unique within an Evaluator - attempting to create a version with a name that already exists will result in a 409 Conflict error.

Headers

X-API-KEYstringRequired

Request

This endpoint expects an object.
specobjectRequired
pathstringOptional

Path of the Evaluator, including the name. This locates the Evaluator in the Humanloop filesystem and is used as as a unique identifier. For example: folder/name or just name.

idstringOptional
ID for an existing Evaluator.
version_namestringOptional
Unique name for the Evaluator version. Version names must be unique for a given Evaluator.
version_descriptionstringOptional
Description of the version, e.g., the changes made in this version.

Response

Successful Response
pathstring
Path of the Evaluator including the Evaluator name, which is used as a unique identifier.
idstring
Unique identifier for the Evaluator.
specobject
namestring
Name of the Evaluator, which is used as a unique identifier.
version_idstring
Unique identifier for the specific Evaluator Version. If no query params provided, the default deployed Evaluator Version is returned.
created_atdatetime
updated_atdatetime
last_used_atdatetime
version_logs_countinteger
The number of logs that have been generated for this Evaluator Version
total_logs_countinteger
The number of logs that have been generated across all Evaluator Versions
inputslist of objects
Inputs associated to the Evaluator. Inputs correspond to any of the variables used within the Evaluator template.
directory_idstring or null
ID of the directory that the file is in on Humanloop.
version_namestring or null
Unique name for the Evaluator version. Version names must be unique for a given Evaluator.
version_descriptionstring or null
Description of the version, e.g., the changes made in this version.
descriptionstring or null
Description of the Evaluator.
schemamap from strings to any or null
The JSON schema for the File.
readmestring or null
Long description of the file.
tagslist of strings or null
List of tags associated with the file.
type"evaluator" or nullDefaults to evaluator
environmentslist of objects or null
The list of environments the Evaluator Version is deployed to.
created_byany or null
The user who created the Evaluator.
evaluatorslist of objects or null
Evaluators that have been attached to this Evaluator that are used for monitoring logs.
evaluator_aggregateslist of objects or null
Aggregation of Evaluator results for the Evaluator Version.
attributesmap from strings to any or null
Additional fields to describe the Evaluator. Helpful to separate Evaluator versions from each other with details on how they were created or used.

Errors