Set Deployment

POST

Deploy Prompt to an Environment.

Set the deployed version for the specified Environment. This Prompt will be used for calls made to the Prompt in this Environment.

Path parameters

idstringRequired
Unique identifier for Prompt.
environment_idstringRequired
Unique identifier for the Environment to deploy the Version to.

Query parameters

version_idstringRequired
Unique identifier for the specific version of the Prompt.

Response

This endpoint returns an object.
pathstring
Path of the Prompt, including the name, which is used as a unique identifier.
idstring
Unique identifier for the Prompt.
modelstring

The model instance used, e.g. gpt-4. See supported models

namestring
Name of the Prompt.
version_idstring
Unique identifier for the specific Prompt Version. If no query params provided, the default deployed Prompt Version is returned.
created_atdatetime
updated_atdatetime
statusenum
Allowed values: uncommittedcommitteddeleted
The status of the Prompt Version.
last_used_atdatetime
version_logs_countinteger
The number of logs that have been generated for this Prompt Version
total_logs_countinteger
The number of logs that have been generated across all Prompt Versions
inputslist of objects
Inputs associated to the Prompt. Inputs correspond to any of the variables used within the Prompt template.
directory_idstringOptional
ID of the directory that the file is in on Humanloop.
endpointenumOptional
Allowed values: completechatedit
The provider model endpoint used.
templatestring or list of objectsOptional

For chat endpoint, provide a Chat template. For completion endpoint, provide a Prompt template. Input variables within the template should be specified with double curly bracket syntax: {{INPUT_NAME}}.

providerenumOptional
The company providing the underlying model service.
max_tokensintegerOptionalDefaults to -1

The maximum number of tokens to generate. Provide max_tokens=-1 to dynamically calculate the maximum number of tokens to generate given the length of the prompt

temperaturedoubleOptionalDefaults to 1
What sampling temperature to use when making a generation. Higher values means the model will be more creative.
top_pdoubleOptionalDefaults to 1

An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass.

stopstring or list of stringsOptional
The string (or list of strings) after which the model will stop generating. The returned text will not contain the stop sequence.
presence_penaltydoubleOptionalDefaults to 0
Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the generation so far.
frequency_penaltydoubleOptionalDefaults to 0
Number between -2.0 and 2.0. Positive values penalize new tokens based on how frequently they appear in the generation so far.
othermap from strings to anyOptional
Other parameter values to be passed to the provider call.
seedintegerOptional
If specified, model will make a best effort to sample deterministically, but it is not guaranteed.
response_formatobjectOptional

The format of the response. Only {"type": "json_object"} is currently supported for chat.

toolslist of objectsOptional
The tool specification that the model can choose to call if Tool calling is supported.
linked_toolslist of objectsOptional
The tools linked to your prompt that the model can call.
attributesmap from strings to anyOptional
Additional fields to describe the Prompt. Helpful to separate Prompt versions from each other with details on how they were created or used.
commit_messagestringOptional
Message describing the changes made.
type"prompt"Optional
environmentslist of objectsOptional
The list of environments the Prompt Version is deployed to.
created_byobjectOptional
The user who created the Prompt.
evaluatorslist of objectsOptional
Evaluators that have been attached to this Prompt that are used for monitoring logs.
evaluator_aggregateslist of objectsOptional
Aggregation of Evaluator results for the Prompt Version.

Errors